Java Interview Questions

Test Your Java Tricky Questions

Test Your Java Tricky Questions Question 1 on Test Your Java Tricky Questions: What is the output of the following code?

Output: In child display method In child display method (Your guess may be: In parent display method and In child display method). Reason: Child class is not explicitly…

Java Keyboard Input

For every language keyboard input is a must. That is, the user can feed data to a running Java program using keyboard. Java Keyboard Input involves I/O Streams. In Java Keyboard Input can be taken in three ways using three different classes. Let us explore one and then see the…

AWT Interview Questions

What is AWT?AWT stands for Abstract Window Toolkit and infact it is a package – java.awt. The classes of this package give the power of creating a GUI environment to the programmer in Java. What is component?By definition, the subclass of a java.awt.Component class is known as a component. A…

Networking Interview Questions

What is Socket? (of Networking Interview Questions) Socket is the end-point of communication for a system. A Socket constructor comes with two parameters of IP address of the other system where the communication should go and the port number on which the service is available on the server required by…

Applets Interview Questions

Read all Applets Interview Questions. What is an applet? (of Applets Interview Questions) Applet is a Java program with special syntax to execute in a browser. Applet does not contain main() method. What is the importance of applets in Java coding? (of Applets Interview Questions)Applets can be loaded on client-side…

IO Java Interview Questions

What is a IO stream?It is a stream of data that flows from source to destination. Good example is file copying. Two streams are involved – input stream and output stream. An input stream reads from the file and stores the data in the process (generally in a temporary variable).…

Exceptions Interview Questions

What is an exception?The English literature meaning is "something that happens unusually (very rarely)". It is the same meaning with Java also. Exception can be defined as a problem occurring at runtime that prevents the execution of the program. Or to say, an exception is a runtime problem (not compile…

String StringBuffer Interview Questions

String StringBuffer Interview Questions Read well String StringBuffer Interview Questions. What is a String in Java?In Java, String does not terminate with \0. String is a class from java.lang package and can be manipulated with String class methods. How strings are immutable? In case of variables, if a variable value…

Arrays Java Interview Questions

What is the advantage of arrays in a programming language? (of Arrays Java Interview Questions) Arrays avoid the declaration of a number of variables. With one array variable, number of values can be stored, using index numbers. What are the features of arrays in Java? (of Arrays Java Interview Questions)…

Object Casting Polymorphism Interview Questions

Note: Explanation is given avoiding more buzz words. Easily understandable manner. Object Casting Polymorphism Interview Questions What is casting? Converting one data type (or object) to the other is known as casting. It is required in a programming language as the user entered data may be in different form than…

OOPS Java Interview Questions

Note 1: The answers do not use more technical buzz words. It is done to understand the concept very clearly so that a novice can put it in his own words in interviews. OOPS Concepts What are local and global variables? A variable declared inside a method is known as…

Test Your Java 8

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 7

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 6

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 5

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 4

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 3

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…

Test Your Java 2

Total 8 tests are available under "Test Your Java" series. Test-1, Test-2, Test-3, Test-4, Test-5, Test-6 are basic level questions and Test-7, Test-8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a…

Test Your Java 1

Test Your Java 7 and Test Your Java 8 are advanced questions. Answers are given for each question at the end of each test. Answering these questions increases your knowledge in Java and helps you a lot when you appear for interviews. Solving these basic questions is your first step…