Zafrul
TechStack
Home
Blog
Interview Q&A
Projects
AI Assistant
Resume Analyzer
Job Match
Contact
Java
General
Interview questions on General.
All Levels
Beginner
Intermediate
Advanced
Search
Showing
10
of
78
questions
1. How to make a class immutable?
+
2. What are variable length arguments in Java?
+
3. How do you copy a TreeMap to another?
+
4. Can we replace arguments in main method with variable length arguments?
+
5. There are two variables: int i = 9 and int i = 09, is there a difference between the two? Is int i = 09 a valid statement?
+
6. Suppose you have 2 threads. One of them prints (1,2,3…) and the other one prints (A,B,C,..). How will you ensure that they run in a sequence, so that it prints (1,A,2,B…)?
+
7. What is a Base class?
+
8. How many ways can an object be created in Java?
+
9. Why does Java have two ways of creating strings (literal vs new keyword)?
+
10. Difference between Abstract Class and Base Class?
+
Previous
Page 1 of 8
Next