Java Online Quiz for Experts Welcome to your Java Online Quiz for Experts Name Email 1.) Which two are valid constructors for Thread? A.) Thread(Runnable r, String name) B.) Thread() C.) Thread(int priority) D.) Thread(Runnable r, ThreadGroup g) E.) Thread(Runnable r, int priority) 2.) Which of the following will directly stop the execution of a Thread? A.) wait() B.) notify() C.) notifyall() D.) exits synchronized code 3.) You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in the natural order. Which interface provides that capability? A.) java.util.Map B.) java.util.Set C.) java.util.List D.) java.util.Collection 4.) Which interface does java.util.Hashtable implement? A.) Java.util.Map B.) Java.util.List C.) Java.util.HashTable D.) Java.util.Collection 5.) What allows the programmer to destroy an object x? A.) x.delete() B.) x.finalize() C.) Runtime.getRuntime().gc() D.) Only the garbage collection system can destroy an object. 6.) Which of the below is a valid way to instantiate an array in java? A.) int myArray [] = {1, 3, 5}; B.) int myArray [] [] = {1,2,3,4}; C.) int [] myArray = (5, 4, 3); D.) int [] myArray = {β1β, β2β, β3β}; 7.) Can we have two main methods in a java class? A.) Yes B.) No Time's up Fuel Your Passion for Coding: Dive into Our Other PostsCore Java Online QuizPHP Online QuizReact Online QuizPython Online QuizJavaScript Online QuizFrench Online Quiz for BeginnersPython Control Structures Online QuizJava OOPs Quiz - Part 1CyberArk PAM QuizPython String Quiz