Java today is one of the most sought programming languages by developers and programmers all over the world. The Java platform is being used for development of all kinds of rich applications in phones, tablets, desktops, speakers & other IT enabled software. Thus, demand for Java developers has increased in the market & everybody is jumping on the bandwagon to secure the job of a Java developer. So if you are also in the race & are going to face technical Java interview questions during recruitment but don’t know where to look for the basic Java interview questions, then a complete ready reckoner guide is here for you.
1. What is Java?
Java is a platform independent & object oriented programming language called OOPS. This language was discovered by Mr. James Gosling of Sun Micro systems in early 1991.
2. What is class & define abstract class in Java?
In simple Java terms, class refers to a group of similar objects with the same attributes (data structure) and behavior (function). Java consists of different types of classes such as abstract class, interface class, etc. Abstract class is a differential implemented class (means some portion of this class can be fully implemented during execution while other portions can not be fully implemented).
3. What is the difference between an interface & abstract class in Java?
An abstract class has no direct instances in the system & consists of methods inside the code strings, while such a feature is absent in the interface class.
4. Explain some of the basic features of Java.
Here you can explain many features of Java such as:
- Java is reusable
- Unlike other programming languages, Java gives the main emphasis to data instead of procedure – thus making it more user-friendly.
- Java is a very secure language as none of the data can be accessed by the external or third party function directly without the first user’s permission.
- Java is platform independent.
5. Explain the difference between a queue & a stack.
The basic difference between a queue and a stack is that a queue works on FIFO concept (that is, first in first out rule) while the stack works on LIFO concept (means last in first out) rule.
6. What do you mean by Java packaging?
Java packaging helps in neat & concise filing of different classes into the respective directories, thus making it easier for the user to categorize the data properly. So if you are dealing with various modules & want to organize your files into proper classes without much hassle, then Java packaging is the apt solution for you.
Besides these basic Java interview questions, you will be asked to write some basic programs in Java language explaining different commands used in each step by the interviewer. The interviewer may also give you some already written programs & you have to find the error(s) present in any steps of the given program stating the reason of errors present with proper logic. So just brush up on your Java fundamentals from any resources available to you & practice some programs execution & running on the computer to master the language & sail through the Java interview questions easily.