Top 10 Java Basic Interview Questions & Answer
Skip to main content

Top 10 Java Basic Interview Questions & Answer

                                             java interview questions and answers,java interview questions,top 10 java interview questions,top java interview questions and answers in 2022, Java Basic Interview Questions



                                                            Java Tutorials with GKR


Top 10 Java Basic Interview Questions & Answer

Java Basic Interview Questions & Answer

1. What is Java?

Answer:- Java is object oriented programming language that produces software for multiple platforms. Java has developed by Sun Microsystems Inc in 1991. At the initial level its called a “Oak” but its was renamed “JAVA” in 1995.Java was developed by James Gosling, Patrick, ED Frank and Mike Sheridan.

2. What are the features of Java?

Answer:- There are different types of the Java Features:-
1. Simple:- Java was designed to be easy for the programmers to learn and use. Because java inherit  the C/C++ syntax and many of the OOP Features of C++.

2. Secure:- when you are download any code then its contain many of harmful virus or harmful code.More Read....... 

3. Explain the JVM architecture?

Answer:-  JVM is called  Java virtual machine. This is act as run time engine. That is use to run a Java programs at a run time. JVM is used to call a main method  that you used in your source code.

JVM have a two work first convert Java source code into Intermediate code that is called Byte code through a Java Compiler. There is generate a .class file. That .class file you directly run into other operating systems. In a java any program you want compile then you use a JAVAC in command prompt.

           When Java program has compiled then JVM have a second work is the Byte code convert into Machine code through  a Java Interpreter.  for run a interpreter you write into your command prompt JAVA class name then you get a Output of the program

4. What is OOP's concepts?

Answer:- There are different types of OOP's concepts.

1. Object:- A entity that's behaviour and state is known as Objects. For example fan, bike, bus etc. It can be physical or logical. Objects can be defined as instance of a class. Object takes some space in memory.

2. Class:- Class is collection of the Objects. It is a logical entity. Class does not consume any memory.

3. Inheritance:- When child class object acquires all the properties and behaviours of the parent class object is called a Inheritance. Its provide code reusability.

4. Polymorphism:- Polymorphism means "more form" this is allow us to perform a single task in different ways. For the polymorphism we use method overloading and method overriding.

5. Abstraction:- Hiding internal details from the users provide only functionality is called Abstraction. More known about Abstraction click here...... 

6. Encapsulation:- Encapsulation is a process wrapped the code and data in a single unit is called a Encapsulation.


5. How Java different from the C++?

Answer:- Difference between Java and C++ 

1. C++ is Platform dependent but Java is platform independent language.

2. C++ write a structural programs without using class and objects but Java is pure Object Oriented Programming Language that except primitive data types.

3. C++ does not support documentation comments but Java support (/**.......*/) documentation comments.

4. C++ fully support pointer but Java doesn't accept pointer.

C++ support multiple Inheritance but Java is not support multiple Inheritance.


6. Name of IDE's for Java?

Answers:- Name of Best IDE's support Java

1. Intelli J IDEA

2. Eclipse

3. NetBeans

4. Oracle J Developer

5. Visual Studio


7. What is JDK?

Answer:- JDK is called a Java Development Kit. It is internally contains  Java Runtime Environment (JRE) and Java Virtual Machine (JVM). Java Development Kit provides all  tools  which is used in Java or require in Java.

8. What is the newest version of JDK?

Answer :- JDK 18 is newest version that released on 22 March 2022.

9. What is JRE?

Answer:- JRE is called a Java Runtime Environment. JRE is provide a environment there Java Program is execute. for example you compile your Java program then Java Virtual Machine  (JVM)  is convert into Bytecode there its generate at .class file that .class file you run any platform only require a JRE.

10. Difference between primitive and non Primitive  data types?

Answer:- There are differences between primitive and non Primitive data types:-

1. Primitive data types is pre defined but non Primitive data types defind by programmers.

2. Non Primitive data types can be used to call a methods to perform a operations but Primitive data types doesn't.

3. Primitive data types always contains value but non Primitive data contains null.

4. Primitive data types start with lowercase letter but non Primitive data types start with uppercase latter.

5. The size of primitive data types depends on the data types and non Primitive data types have all same.

6. Primitive data types is byte,int,char,double,flot etc and non Primitive data types is String, Array, Classes, Interface etc

Post a Comment

0 Comments