This article provides a list of top Java puzzles on Java Collections for Java certification exams like SCJP/OCJP. Popular & Tricky Puzzles Java Collections : Article 1: Java Quiz on adding elements in an ArrayList (Try it) Article 2: Java quiz on removing elements from an ArrayList (Try it) Article […]
Category: Java Quiz
Java Quiz on recursive calls
What will be the output of following Java quiz ? In following Java program, two JavaQuiz objects are created and a method callAgain() is called to manipulate the value of state variable. What will be the output when this program is executed ? Answer For the first call to callAgain(), the […]
Java Quiz on PriorityQueue
What will be the output of following Java quiz on PriorityQueue ? Answer PriorityQueue keeps elements sorted and it can have duplicates. add() and offer() methods both offer same functionality. poll() method removes the first element in queue and returns it, while peek() method returns the first element without removing it. Correct […]

Java quiz on comparing strings and stringbuffers
What will be the output of following quiz on comparing strings and stringbuffers? Answer “false,true” You may also like Top 10 popular and tricky Java puzzles Top Java articles : March 2016 Best 25 Java articles on the web in 2015 Popular Articles you may like : Java 8 […]
Java Puzzle on Thread join
What will be the output of following quiz Threads? Answer Correct answer is 11 You may also like Top 10 popular and tricky Java puzzles Top Java articles : March 2016 Best 25 Java articles on the web in 2015 Popular Articles you may like : Java 8 Interview Questions […]