D286 Java Fundamentals - Set 2 - Part 2

Test your knowledge of technical writing concepts with these practice questions. Each question includes detailed explanations to help you understand the correct answers.

Question 21: What is the ArrayList class used for?

Question 22: How does an ArrayList differ from a standard array?

Question 23: Which collection interface guarantees no duplicate elements?

Question 24: What does the Map interface store?

Question 25: What does generics provide in Java, as in ArrayList<String>?

Question 26: What is an exception in Java?

Question 27: What is the difference between a checked and an unchecked exception?

Question 28: Which exception indicates an attempt to use a null reference?

Question 29: What is the purpose of the finally block?

Question 30: What does the throw keyword do?

Question 31: What is try-with-resources used for?

Question 32: What is a NumberFormatException typically caused by?

Question 33: What is the Scanner class commonly used for?

Question 34: What does System.out.println() do?

Question 35: What is the purpose of the Math class?

Question 36: What does Math.random() return?

Question 37: What is a static method?

Question 38: Why can a static method not directly access instance fields?

Question 39: What is an enum in Java?

Question 40: What is the switch statement's advantage over long if-else chains?


Complete the Captcha to view next question set.


Quick View

Don't Want to Study?

Save Time on Studies, Spend More with Family & Friends! Pay-After-you-Pass!

Get Exam Support