Babu Madhav Institute of Information Technology, UTU

Similar documents
Java Interview Questions and Answers

AP Computer Science Java Subset

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

Java Application Developer Certificate Program Competencies

CS506 Web Design and Development Solved Online Quiz No. 01

Java SE 8 Programming

Fundamentals of Java Programming

Java (12 Weeks) Introduction to Java Programming Language

Java from a C perspective. Plan

public static void main(string[] args) { System.out.println("hello, world"); } }

Specialized Programme on Web Application Development using Open Source Tools

Java SE 7 Programming

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013

INPUT AND OUTPUT STREAMS

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

WRITING DATA TO A BINARY FILE

Java Programming Fundamentals

Creating a Simple, Multithreaded Chat System with Java

Preet raj Core Java and Databases CS4PR. Time Allotted: 3 Hours. Final Exam: Total Possible Points 75

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

C++ INTERVIEW QUESTIONS

: provid.ir

JAVA - FILES AND I/O

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Using Files as Input/Output in Java 5.0 Applications

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

Java SE 7 Programming

Java SE 7 Programming

D06 PROGRAMMING with JAVA

Building a Multi-Threaded Web Server

JAVA - INHERITANCE. extends is the keyword used to inherit the properties of a class. Below given is the syntax of extends keyword.

Java Programming Language

CS 111 Classes I 1. Software Organization View to this point:

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits)

Chapter 2 Introduction to Java programming

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

JAVA INTERVIEW QUESTIONS

What is an I/O Stream?

Files and input/output streams

Java CPD (I) Frans Coenen Department of Computer Science

Objectif. Participant. Prérequis. Remarque. Programme. C# 3.0 Programming in the.net Framework. 1. Introduction to the.

FILE I/O IN JAVA. Prof. Chris Jermaine Prof. Scott Rixner

Event-Driven Programming

Evaluation. Copy. Evaluation Copy. Chapter 7: Using JDBC with Spring. 1) A Simpler Approach ) The JdbcTemplate. Class...

Programming Languages CIS 443

DIPLOMADO DE JAVA - OCA

Web Development in Java

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

CS 1302 Ch 19, Binary I/O

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Explain the relationship between a class and an object. Which is general and which is specific?

Programmation 2. Introduction à la programmation Java

Chapter 9 Java and SQL. Wang Yang wyang@njnet.edu.cn

Crash Course in Java

Specialized Programme on Web Application Development using Open Source Tools

IT6503 WEB PROGRAMMING. Unit-I

Pemrograman Dasar. Basic Elements Of Java

Programming and Software Development (PSD)

AP Computer Science Java Mr. Clausen Program 9A, 9B

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

An Overview of Java. overview-1

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Chapter 20 Streams and Binary Input/Output. Big Java Early Objects by Cay Horstmann Copyright 2014 by John Wiley & Sons. All rights reserved.

Quick Introduction to Java

Introduction to Java

1 of 1 24/05/ :23 AM

Exception Handling. Overloaded methods Interfaces Inheritance hierarchies Constructors. OOP: Exception Handling 1

Basic Programming and PC Skills: Basic Programming and PC Skills:

CS2506 Operating Systems II Lab 8, 8 th Tue/03 /2011 Java API

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand:

Chapter 1 Java Program Design and Development

JDBC (Java / SQL Programming) CS 377: Database Systems

J a v a Quiz (Unit 3, Test 0 Practice)

Today s Outline. Computer Communications. Java Communications uses Streams. Wrapping Streams. Stream Conventions 2/13/2016 CSE 132

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

El Dorado Union High School District Educational Services

Database Programming with PL/SQL: Learning Objectives

The Interface Concept

Lecture J - Exceptions

Java EE Web Development Course Program

B.Sc (Honours) - Software Development

Stream Classes and File I/O

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

Syllabus for CS 134 Java Programming

Lecture 5: Java Fundamentals III

AVRO - SERIALIZATION

You are to simulate the process by making a record of the balls chosen, in the sequence in which they are chosen. Typical output for a run would be:

Course Number: IAC-SOFT-WDAD Web Design and Application Development

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10)

Glossary of Object Oriented Terms

Core Java+ J2EE+Struts+Hibernate+Spring

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files

JAVA IN A NUTSHELL O'REILLY. David Flanagan. Fifth Edition. Beijing Cambridge Farnham Köln Sebastopol Tokyo

Agenda. What is and Why Polymorphism? Examples of Polymorphism in Java programs 3 forms of Polymorphism

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007

Transcription:

Unit-1(Java Platform and Programming Elements) 1. What is byte code? 2. Define: JVM. 3. Define: JRE 4. What is Unicode? 5. Define: codepoint. 6. Which package is used by Scanner class? 7. List four methods of scanner class. 8. Why main() declared as a static method? 9. Define boxing. 10. What is garbage collection? 11. What is unboxing? 12. List any one key difference between break and continue statement. 13. Write one usage of block statement. 14. List out two main categories of control flow statement in Java. 15. What is empty statement? 16. What is ragged array? 17. Why count and Count are considered as different identifiers? 18. How to present non-graphical character in Java? 19. What is NULL reference? 20. Does Java allow forward reference declaration? 21. Differentiate between procedure languages and OOP languages. 22. Give the difference between JVM and JRE. 23. Write once; run anywhere any time, forever Justify. 24. Java is a robust language, Justify. 25. How we can convert byte into integer, Briefly define with an example. 26. What are the needs of control flow statements in Java? 27. How to read data from keyboard? Give example. 28. List any two usage of garbage collector. 29. Write difference between break and continue. 30. Briefly define significance of public static void main(string args*+). 31. Write role of JVM. 32. What is data type? What are different data types supported in Java? 33. What are escape sequence and why they are needed? 34. Define array. Write syntax of creating array. 35. Write difference between regular and jagged array. 1. Explain architecture of JVM. 2. Write features of Java. 3. Explain the structure of a Java program. Ms. Nehal Adhvaryu and Ms. Foram Shah Page 1

4. Explain how Java achieve platform independent feature? 5. Why switch case is better than multiple if else statements? Explain it with suitable example. 6. Why Java does not support goto statement? What is the alternative way of defining goto statement behaviour in Java? Explain it with example. 7. What is the use of label break statement in Java? Discuss it with suitable example. 8. Classify control flow statements with diagram. Explain any two iteration statements with its syntax and suitable example for each. 9. Explain all selection control statements with syntax and example. 10. Explain all Iteration control statements with syntax and example. 11. What are the differences between break, continue and return statements? Write the syntax for all and develop an interactive program which illustrates the differences. 12. What are multidimensional arrays? Explain their syntax and mechanism for accessing their elements. 13. Can array be initialized at the same time they are defined? If yes, explain its syntax with suitable examples. 14. How to pass array in method? Explain it with suitable example. 15. What is jagged array? Write usage of it. Explain their syntax and mechanism for accessing their elements. Unit-2(Classes and Objects) 1. Define class. 2. What is constructor? 3. Write one usage of constructor. 4. What is the default scope of the variable? 5. static{ System.out.println( In Static Block ); } public static void display() { System.out.println( In Static display() ); } What will be the output of below code? 6. What is the use of finalize()? 7. How to create object reference? Write it s syntax. 8. final int x=10; Can I change the value of x at the time of execution? 9. Assume that Circle is a class, What should be the value of c in the below statement? Circle c; 10. Write the usage of this with suitable example. 11. What is object? How to create object? Give example. 12. When a constructor is invoked, which operations are performed? 13. Write the difference between constructor and method? Ms. Nehal Adhvaryu and Ms. Foram Shah Page 2

14. What is method overloading? Write one usage of it. 15. If a constructor has a parameter whose name is same as its class data field, How one can distinguish between them? Write an example for same. 16. Write the usage of final. 17. Write the features of static variable. 18. Write the features of static method. 19. Is it possible to call non static method from static method? Write Example. 20. Write a significance of nested class. 1. What is class? How to create class in java? Explain it with suitable example. 2. Explain parameterized constructor with suitable example. 3. Can we overload the constructor? If yes then explain it with suitable example. 4. How to pass object in a method? Explain it with suitable example. 5. How to pass array object in a method? Explain it with suitable example. 6. Explain method overloading with suitable example. 7. Explain how to pass object reference in method with suitable example. 8. Explain how to pass object reference in constructor with suitable example 9. What are inner classes? What is the need for creating an inner class? 10. Explain static nested classes with suitable example. Unit-3(Inheritance, Interface & Package) 1. What is inheritance? 2. Write usage of inheritance. 3. Define interface. 4. List type of inheritance supported by Java. 5. Write the usage of super. 6. Write the difference between super and this. 7. What is the default access modifier of a variable and method? 8. What is package? 9. Define classpath. 10. Name five standard packages in java. 11. Write the advantages of inheritance. 12. Write the difference between method overloading and overriding. 13. Write the features of abstract class. 14. Write the difference between interface and class. 15. Write the difference between interface and abstract class. 16. Which keyword is used to call a constructor of same class? 17. Identify following method whether it is abstract method or nonabstract method? abstract class shape{ public void dimension();} 18. final class Rectangle{}; Can I inherit Rectangle class? Ms. Nehal Adhvaryu and Ms. Foram Shah Page 3

19. What is name clashing and how is that resolved? 20. Which inheritance is not supported by Java? Why? 21. How we can access base class constructor from derived class? Give one example. 22. class Animal{} class Mammal extends Animal{} class Reptile extends Animal{} public class Dog extends Mammal{ public static void main(string args[]){ Animal a = new Animal(); Mammal m = new Mammal(); Dog d = new Dog(); System.out.println(m instanceof Animal); System.out.println(d instanceof Mammal); System.out.println(a instanceof Dog); } } What will be output for given code? 23. How to prevent class from being inherited? Give example of it. 1. Explain the need of abstract class with suitable example. 2. Discuss various forms of inheritance with examples. 3. How base class member functions can be invoked in a derived class if the derived class also has a member function with the same name? Explain it with suitable example. 4. Explain dynamic binding with suitable example. 5. What is method overriding? Explain with an example. 6. Explain the access modifier in Java with suitable example. 7. How interface achieve polymorphic behavior? Explain it with example. 8. Explain super keyword with all its usages. 9. Overloaded methods are early bounded whereas overridden methods are late bound. Explain it with suitable example. 10. How java achieve multiple inheritance through interface? Explain it with suitable example. 11. How to create, design and implement package? Explain it with suitable example. 12. Discuss various levels of access protection available for packages. Unit-4 (Exception Handling and Java Stream) 1. Define: Syntax error and semantic error. 2. What is Exception? 3. Define exception handling. State two benefits of using an exception handler. 4. Which keyword is used to monitor statement for exception? 5. Which class is super class for all exception? 6. Is it necessary that each try block must be followed by a catch block? 7. What is finally block? Can finally block b used without catch? 8. Is there any case when finally will not be executed? Ms. Nehal Adhvaryu and Ms. Foram Shah Page 4

9. What is an exception propogation? 10. Define: Streams. 11. Define significance of InputStream and OutputStream. 12. What is the use of Reader class and Writer class? 13. State difference between byte stream and character stream. 14. How to create a new directory by using file object? 15. Which method of File class tells whether file exists or not? 1. Explain exception handling mechanism with an appropriate example. 2. Give difference of following terminology, 1. throw and throws 2. finally and finalize 3. Discuss following exception with an example, 1. ArithmeticException 2. ArrayIndexOutOfBoundsException 3. ClassNotFoundException 4. NullPointerException 5. IOException 4. Can an exception be rethrown? If yes then explain with an example. 5. Explain BufferedReader class with an example. 6. Discuss useful methods of InputStream with an example. 7. Discuss useful methods of OutputStream with an example. 8. What is FileInputStream and FileOutputStream? Explain with an example to read and write into file. 9. What is FileReader and FileWriter? Explain with an example to read and write into file. Unit-5(String and Collections) 1 Justify the statement: String is immutable object. 2 Name the package used for making use of String, StringBuffer and StringBuilder class. 3 List out the steps used to create a string from given character array. 4 How one can copy one String object in another one? 5 Give difference between == operator and equals () method in java. 6 How many ways we can create the String object? 7 State the purpose of tostring(). 8 Which method is used to convert given string into character array? 9 How one can join three strings without using + operator? 10 If a user forgets to import java.lang.* package, is there any possibility of error to be raised? If yes, then specify an error. 11 List the name of two methods used to search a string for a specified character or substring. 12 What is collection framework? List any four benefits of collection framework. 13 What is the difference between Set and List interface? Ms. Nehal Adhvaryu and Ms. Foram Shah Page 5

14 What is the difference between Set and Map interface? 15 What area the classes implementing List and Set interface? 16 What is an iterator? 17 List and define two ways to iterate the element of collection. 18 Which methods are used for character extraction? 19 State the significance of StringTokenizer class. 20 Briefly define three constructors of StringTokenizer class. 1 Explain string comparison methods with an example. 2 Differentiate String, StringBuffer and StringBuilder with an example. 3 Explain delete () and replace() method of StringBuffer class with suitable example. 4 Validate the significance of Collections in creating dynamic data structure. 5 Explain any two basic interfaces of Java collections framework with an example. 6 Explain at least any five StringBuffer class methods using syntax and proper example. 7 Discuss various method used for string comparison. 8 How enumerations differ from iterator interface? 9 List and explain method used for changing the case of character within a string. 10 Demonstrate StringTokenizer class with its methods. Unit-6(JDBC) 1 Define: JDBC 2 List and define four types of JDBC driver. 3 Which type of JDBC driver is fastest one? 4 Compare and contrast Native-API/Partly Java driver and Native-protocol/all Java driver. 5 State the difference between DataSource and DriverManager. 6 How do you create connection object? 7 When do we get java.sql.sqlexception: No suitable driver found? 8 What is statement? 9 What is the difference between java.util.date and java.sql.date? 10 What is the difference between statement and prepared statement? 11 What is the difference between statement and callable statement? 12 What is the role of JDBC DriverManager class? 13 State the role of JDBC ResultSet interface. 14 What are the types of ResultSet? 15 What is JDBC RowSet? What are the different types of RowSet? 16 What is the difference between ResultSet and RowSet? 17 What is transaction? 18 Which interface is responsible for transaction management in JDBC? 19 State the function of setautocommit. 20 Why do you have to close database connection in Java? 21 What is dirty read? Ms. Nehal Adhvaryu and Ms. Foram Shah Page 6

1 Explain JDBC architecture in detail. 2 What are the JDBC API components? Explain each component in detail. 3 Explain prepared and callable statement with an example. 4 Describe steps require to connect database in java. 5 Explain purpose of class.forname(). 6 How do you register a driver? Describe each way with an example. 7 How cursor works in scrollable ResultSet? 8 Discuss the benefits of prepared statement over statement. 9 How does the JDBC handle stored procedure in certain database system? 10 Explain the difference between execute, executequery and executeupdate with an example. Ms. Nehal Adhvaryu and Ms. Foram Shah Page 7