Saturday, September 14, 2019

Common java interview questions

Today I am sharing a common java interview questions for your internship or for getting a job in IT companies like IBM , mind tree , tech mahindra , cognizant , HCl e.t.c. 

So here I am providing a some important common java interview questions which are listed below - 

1. What is trim method ?

Answer. Trim method remove space from both the end of STRIM .

2. JVM Stands For ?

Answer. Java Virtual Machine 

3. What are the main characteristics of java programming language -


• Syntax used in java same as c++ and c .
• multiple inheritance is not used in java .

• pointer not used in java .

4. What are the common primary component in java -

Answer. There are three main component in java 

• Java runtime environment ( JRE )

• Java development kit ( JDK )

• Java Virtual machine ( JVM )

5. Java virtual machine converts 

Answer. Actually java virtual machine ( JVM ) converts bytecode into machine code 

6. How many types of variable in java programming language -

Answer. There are three common variable in java -

• Instance variable 

• Local variable 

• Static Variable 

7. What is multithreading in java programming language ?

Answer. Multithreading is a procedure where multiple thread run at the same time .

8. Is empty java file name a valid source file name ?

Answer. Yes empty java file valid source file name .

9. Is &&= a vaild java operator ?

Answer. No 

10. How many types of primitive data in java ?

Answer. There are eight types of primitive data in java -

1. Boolean
2. Short
3. Int
5. Float
6. Double
7. Char
8. Byte

11. How many types of inheritance in java ?

Answer. There are three types of inheritance in java -

• Single inheritance 

• multilevel inheritance 

• hierarchical inheritance 


               A. Single inheritance

B. Multilevel inheritance

C. Hierarchical inheritance





No comments:

Post a Comment