Top Core Java Questions and Answers for Exam Preparation

Explore top Core Java questions and answers to boost your exam preparation and enhance your understanding of key concepts.

Core Java Questions

Q. Which collection class allows duplicate elements?

View Solution

Q. What is the output of System.out.println(Math.random());?

View Solution

Q. Which of the following is a marker interface in Java?

View Solution

Q. What is the output of System.out.println(‘a’ + ‘b’);?

View Solution

Q. Which method is used to start a thread in Java?

View Solution

Q. Which of these is a valid declaration of a two-dimensional array?

View Solution

Q. What will happen if an exception is not handled in a Java program?

View Solution

Q. Which keyword is used to inherit a class in Java?

View Solution

Q. Why are String objects in Java considered immutable?

View Solution

Q. Which method of the String class would you use to get the number of characters in a string?

View Solution
Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!