learn java

JavaInterview QuestionsJava Interview

Java Intermediate Interview Questions

Java Intermediate Interview Questions
31.
Apart from the security aspect, what are the reasons behind making strings immutable in Java?
32.
What is a singleton class in Java? And How to implement a singleton class?
33.
Which of the below generates a compile-time error? State the reason.
34.
How would you differentiate between a String, StringBuffer, and a StringBuilder?
35.
Using relevant properties highlight the differences between interfaces and abstract classes.
36.
Is this program giving a compile-time error? If Yes then state the reason and number of errors it will give. If not then state the reason.
37.
What is a Comparator in java?
38.
In Java, static as well as private method overriding is possible. Comment on the statement.
39.
What makes a HashSet different from a TreeSet?
40.
Why is the character array preferred over string for storing confidential information?
41.
What do we get in the JDK file?
42.
What are the differences between JVM, JRE and JDK in Java?
43.
What are the differences between HashMap and HashTable in Java?
44.
What is the importance of reflection in Java?
45.
What are the different ways of threads usage?
46.
What are the different types of Thread Priorities in Java? And what is the default priority of a thread assigned by JVM?
47.
What is the difference between the program and the process?
48.
What is the difference between the ‘throw’ and ‘throws’ keyword in java?
49.
What are the differences between constructor and method of a class in Java?
50.
Identify the output of the below java program and Justify your answer.
51.
Java works as “pass by value” or “pass by reference” phenomenon?
52.
What is the ‘IS-A ‘ relationship in OOPs java?
53.
Which among String or String Buffer should be preferred when there are lot of updates required to be done in the data?
54.
How to not allow serialization of attributes of a class in Java?
55.
What happens if the static modifier is not included in the main method signature in Java?
56.
Consider the below program, identify the output, and also state the reason for that.
57.
Can we make the main() thread a daemon thread?
58.
What happens if there are multiple main methods inside one class in Java?
59.
What do you understand by Object Cloning and how do you achieve it in Java?
60.
How does an exception propagate in the code?
61.
How do exceptions affect the program if it doesn’t handle them?
62.
Is it mandatory for a catch block to be followed after a try block?
63.
Will the finally block get executed when the return statement is written at the end of try block and catch block as shown below?
64.
Can you call a constructor of a class inside the another constructor?
65.
Contiguous memory locations are usually used for storing actual values in an array but not in ArrayList. Explain.
66.
Why does the java array index start with 0?
67.
Why is the remove method faster in the linked list than in an array?
68.
How many overloaded add() and addAll() methods are available in the List interface? Describe the need and uses.
69.
How does the size of ArrayList grow dynamically? And also state how it is implemented internally.

Read More
10 Best Artificial Intelligence Software|artificial intelligence tools 5 nft games to earn money | Best NFT games for earn crypto Earn Money From Minting NFTs| How to mint NFT for free Top 10 Things You Need To Know About Python List | python lists functions 10 Popular PHP frameworks for web developers| best php frameworks 12 Tips On How To Become a Python Developer | python For beginner 12 Best Nodejs Frameworks for App Development in 2022 how to create google web stories, Steps to create web stories Top 10 Features in Angular 13 Every Developer Should Know | Angular 13 Features 10 Best Angular UI Libraries | angular ui components | angular Project 10 Best Web Development Frameworks in 2022 Frontend & Backend 18 Best Open-Source and Free Database Software | best database software for beginners Top 10+ Best Java IDEs & Online Java Compilers | best java ide for beginners top 10 besic to andvance java books |java books for beginer Top 5 Themes For Blogger, professional blogger theme download BEST Python Courses Online,Top 10 Courses to Learn Python in 2022 Top 13 python libraries for data science