0% found this document useful (0 votes)
17 views3 pages

Core Java Interview Questions

This document contains questions about core Java concepts and programming techniques. It covers topics like Java fundamentals, OOP concepts, memory areas, exceptions, collections, strings and more. Multiple choice, coding and output based questions are included to test Java skills.

Uploaded by

sindhu991994
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
17 views3 pages

Core Java Interview Questions

This document contains questions about core Java concepts and programming techniques. It covers topics like Java fundamentals, OOP concepts, memory areas, exceptions, collections, strings and more. Multiple choice, coding and output based questions are included to test Java skills.

Uploaded by

sindhu991994
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 3

Core Java Interview Questions

What is Java? Explain its meaning and definition.


The syntax of Java is based on which programming language?
How is Java platform independent?
When was Java developed?
What does `write once run anywhere' mean in Java?
What is Java Virtual Machine (JVM)?
What is Java Runtime Environment (JRE)?
What is Java SE (Standard Edition)?
What are operators in Java?
What are the different types of Java operators?
What is JIT compiler in Java?
What is a package in Java?
What are Tokens in Java?
What is difference between Java and JavaScript?
Which Java class is considered a superclass of all other classes?
Is it possible for a class to extend itself?
Is it possible to assign a superclass to a subclass in Java?
How to print text in Java?
What is multithreading in Java?
Which class is used for multithreading in Java?
What is Java applet?
What is garbage collection in Java?
What if you use Java keywords as a variable or identifier?
What is inheritance in Java?
What is polymorphism in Java?
What is encapsulation in Java?
What is serialization in Java?
What is Java JDBC?
What is constructor overloading in Java?
What is copy constructor in Java?
Which keyword in Java is used to inherit a class?
What are the top benefits of inheritance in Java?
What are the different memory areas assigned by JVM?
What are access modifiers in Java?
How many types of inheritance are there in Java?
Can you restrict an object from inheriting its subclass? If yes, how?
How can we remove the duplicate elements from a list of numbers if Java 8 is being
used?
What is the difference between heap memory and stack memory in Java?
What is the difference between equals() method and equality (==) operator in Java?
Can you inherit static members to a subclass?
Can you override the final method in Java?
How to declare an infinite loop in Java?
What are the roles of final, finally, and finalize keywords in Java?
When to use the super keyword in Java?
What is a ClassLoader in Java?
What are the different types of ClassLoaders in Java?
Is it possible to access the members of a subclass if you create a superclass'
object?
How to define a functional interface in Java?
Difference between Error and Exception in Java?
Difference between checked and unchecked Exception in Java?
Why Java doesn't support multiple inheritances?
Why wait and notify method are declared in **Object** class in Java?
Difference between this and super in Java?
What is the **String** pool in Java?
Can we access the private method in Java?
Can we override static method in Java?
Difference between **StringBuilder** and **StringBuffer** in Java?
How do you restrict your class from being used by your client?
Difference between method overloading and overriding in Java?
When do you use **Runnable** vs **Thread** in Java?
a=new b(); explain this statement?
what is wait() and sleep() methods?
What is inner process of array list?
Programming based questions
How do you reverse a string in Java?
How do you swap two numbers without using a third variable in Java?
Write a Java program to check if a vowel is present in a string
How do you swap two numbers without using a third variable in Java?
Write a Java program to print a Fibonacci sequence using recursion.
How do you check whether a string is a palindrome in Java?
How do you remove spaces from a string in Java?
How do you sort an array in Java
How do you create a deadlock scenario programmatically in Java?
How can you find the factorial of an integer in Java?
How do you reverse a linked list in Java?
Can you create a pyramid of characters in Java?
Write Java program that checks if two arrays contain the same elements
How do you get the sum of all elements in an integer array in Java?
How do you find the second largest number in an array in Java?
How do you print a date in specific format in Java?
Can you prove that a String object in Java is immutable programmatically?
Can you write some code to showcase inheritance in Java?
How do you use the forEach() method in Java?
Show examples of overloading and overriding in Java
Guess the Output:
String s1 = "abc";
String s2 = "abc";

System.out.println("s1 == s2 is:" + s1 == s2);


output.....?
String s3 = "JournalDev";
int start = 1;
char end = 5;

System.out.println(s3.substring(start, end));
output......?

try {
if (flag) {
while (true) {
}
} else {
System.exit(1);
}
} finally {
System.out.println("In Finally");
}
output.....?

String str = null;


String str1="abc";

System.out.println(str1.equals("abc") | str.equals(null));
output.....?

You might also like