SlideShare a Scribd company logo
1 of 4
Download to read offline
What are the different Java interview
questions you need to know?
1) What is the number of memory types allocated by JVM?
Many types:
1. Stack
2. Heap
3. Native Method Stack
4. Program Counter Register
5. Class(Method) Area
2) What is platform?
A system is generally the components or application atmosphere in which a
program operates. There are two types of system software-based and
hardware-based Java provides software-based system.
3) What gives Java its ‘write once and run anywhere’ nature?
The bytecode Java is collected to be a byte program code which is the
advanced language between source program code and device program code.
This byte program code is not system particular and hence can be fed to any
system.
4) What is JIT compiler?
Just-In-Time(JIT) compiler: It is used to boost the efficiency. JIT gathers areas of
the byte program code that have similar efficiency at once, and hence cuts
down the amount of time required for collection. Here the term “compiler”
represents an interpretator from the instruction set of a Java Virtual Machine
(JVM) to the training set of a particular CPU.
5) What is classloader?
The classloader is a subsystem of JVM that is used to fill sessions and
connections.There are various kinds of classloaders e.g. Bootstrap classloader,
Expansion classloader, Program classloader, Plug-in classloader etc.
6) What is the distinction between JDK, JRE and JVM?
JRE
JRE stands for Java Runtime Environment and it is one of the procedure of JVM
JVM
JVM stands for Java Virtual Machine and the execution of Java byte code which
is aided by the abstract machine by providing the runtime environment.
JDK
JDK stands for Java Development Kit and it is existing physically and it consists
of JRE + development tools.
7) Is next, delete, exit, main or null keyword in Java?
No.
8) Will the String array of Main method is empty or null; if any
arguments are not provided on the command line?
It is empty, but not null.
9) What is difference between object oriented development language
and object focused development language?
Object focused development different languages follow all the features of OOPs
except Bequest. Examples of object oriented development different languages
are JavaScript, VBScript etc.
10) What is constructor?
Constructor is just like an approach that is used to initialize situations of a
product. It is invoked at the time of object development.
11) Does constructor come back any value?
yes, that is present example (You cannot use return type yet it gives a value).
12) Is constructor inherited?
No, constructor is not inherited
13) Can you make a constructor final?
No, constructor cannot be final
14) What is static variable?
It is used to relate the typical residence of all things (that is not exclusive for
each object) e.g. company name of workers,college name of scholars etc.
It gets storage only once in education area at the time of sophistication
running.
15) Why main method is static?
As it is not required for the object to instantiate a static method and if it was
non static method, object is first created by jvm and then it calls the main
function and it will lead to the problem of extra allocation of memory.
16) What is static block?
Static data member is initialized using this.
At the time of classloading it was executed before main method.
17) What is the goal of a default constructor?
The standard constructor provides the standard principles to the things.
The Java compiler makes a standard constructor only if there is no constructor
in the class
18) Can we perform a system without main() method?
Yes, one of the way is static block
For more interview questions; you can learn java from the java
tutorial questions given over here. Also check our Java Reviews.

More Related Content

What's hot

JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
nofakeNews
 

What's hot (20)

Design pattern application
Design pattern applicationDesign pattern application
Design pattern application
 
Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
 
Java Concurrency Starter Kit
Java Concurrency Starter KitJava Concurrency Starter Kit
Java Concurrency Starter Kit
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
 
Java design pattern tutorial
Java design pattern tutorialJava design pattern tutorial
Java design pattern tutorial
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Core Java Basics
Core Java BasicsCore Java Basics
Core Java Basics
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
00 intro to java
00 intro to java00 intro to java
00 intro to java
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java Tutorial
 
Java notes
Java notesJava notes
Java notes
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Basic online java course - Brainsmartlabs
Basic online java course  - BrainsmartlabsBasic online java course  - Brainsmartlabs
Basic online java course - Brainsmartlabs
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.
 
1
11
1
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
 
37 Java Interview Questions
37 Java Interview Questions37 Java Interview Questions
37 Java Interview Questions
 

Similar to What are the different java interview questions you need to know?

201 core java interview questions oo ps interview questions - javatpoint
201 core java interview questions   oo ps interview questions - javatpoint201 core java interview questions   oo ps interview questions - javatpoint
201 core java interview questions oo ps interview questions - javatpoint
ravi tyagi
 
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptxchapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
FiromsaDine
 
1) What is your background programming with Java2) What are the J.pdf
1) What is your background programming with Java2) What are the J.pdf1) What is your background programming with Java2) What are the J.pdf
1) What is your background programming with Java2) What are the J.pdf
fckindswear
 

Similar to What are the different java interview questions you need to know? (20)

Top 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfTop 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdf
 
201 core java interview questions oo ps interview questions - javatpoint
201 core java interview questions   oo ps interview questions - javatpoint201 core java interview questions   oo ps interview questions - javatpoint
201 core java interview questions oo ps interview questions - javatpoint
 
java basic .pdf
java basic .pdfjava basic .pdf
java basic .pdf
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Core java interview questions
Core java interview questionsCore java interview questions
Core java interview questions
 
Java introduction
Java introductionJava introduction
Java introduction
 
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptxchapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
chapter_one_Introduction_to_Object_Oriented_Programming_OOP.pptx
 
Java lab zero lecture
Java  lab  zero lectureJava  lab  zero lecture
Java lab zero lecture
 
Basic Java I
Basic Java IBasic Java I
Basic Java I
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
java notes.pdf
java notes.pdfjava notes.pdf
java notes.pdf
 
java slides
java slidesjava slides
java slides
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Java lab lecture 1
Java  lab  lecture 1Java  lab  lecture 1
Java lab lecture 1
 
1) What is your background programming with Java2) What are the J.pdf
1) What is your background programming with Java2) What are the J.pdf1) What is your background programming with Java2) What are the J.pdf
1) What is your background programming with Java2) What are the J.pdf
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

What are the different java interview questions you need to know?

  • 1. What are the different Java interview questions you need to know? 1) What is the number of memory types allocated by JVM? Many types: 1. Stack 2. Heap 3. Native Method Stack 4. Program Counter Register 5. Class(Method) Area 2) What is platform? A system is generally the components or application atmosphere in which a program operates. There are two types of system software-based and hardware-based Java provides software-based system. 3) What gives Java its ‘write once and run anywhere’ nature? The bytecode Java is collected to be a byte program code which is the advanced language between source program code and device program code. This byte program code is not system particular and hence can be fed to any system. 4) What is JIT compiler? Just-In-Time(JIT) compiler: It is used to boost the efficiency. JIT gathers areas of the byte program code that have similar efficiency at once, and hence cuts down the amount of time required for collection. Here the term “compiler” represents an interpretator from the instruction set of a Java Virtual Machine (JVM) to the training set of a particular CPU.
  • 2. 5) What is classloader? The classloader is a subsystem of JVM that is used to fill sessions and connections.There are various kinds of classloaders e.g. Bootstrap classloader, Expansion classloader, Program classloader, Plug-in classloader etc. 6) What is the distinction between JDK, JRE and JVM? JRE JRE stands for Java Runtime Environment and it is one of the procedure of JVM JVM JVM stands for Java Virtual Machine and the execution of Java byte code which is aided by the abstract machine by providing the runtime environment. JDK JDK stands for Java Development Kit and it is existing physically and it consists of JRE + development tools. 7) Is next, delete, exit, main or null keyword in Java? No. 8) Will the String array of Main method is empty or null; if any arguments are not provided on the command line? It is empty, but not null. 9) What is difference between object oriented development language and object focused development language? Object focused development different languages follow all the features of OOPs except Bequest. Examples of object oriented development different languages are JavaScript, VBScript etc. 10) What is constructor?
  • 3. Constructor is just like an approach that is used to initialize situations of a product. It is invoked at the time of object development. 11) Does constructor come back any value? yes, that is present example (You cannot use return type yet it gives a value). 12) Is constructor inherited? No, constructor is not inherited 13) Can you make a constructor final? No, constructor cannot be final 14) What is static variable? It is used to relate the typical residence of all things (that is not exclusive for each object) e.g. company name of workers,college name of scholars etc. It gets storage only once in education area at the time of sophistication running. 15) Why main method is static? As it is not required for the object to instantiate a static method and if it was non static method, object is first created by jvm and then it calls the main function and it will lead to the problem of extra allocation of memory. 16) What is static block? Static data member is initialized using this. At the time of classloading it was executed before main method. 17) What is the goal of a default constructor? The standard constructor provides the standard principles to the things. The Java compiler makes a standard constructor only if there is no constructor in the class
  • 4. 18) Can we perform a system without main() method? Yes, one of the way is static block For more interview questions; you can learn java from the java tutorial questions given over here. Also check our Java Reviews.