Java Basics Quiz May 20, 2021 Leave a Comment on Java Basics Quiz Welcome to your Java Basics Quiz. You are attempting quiz on September 27, 2022. For your information, please note that this Java Basics Quiz has only single choice questions. Read each and every questions carefully before you start answering. You will have 10 min to complete the quiz. Press the Start quiz button to initiate the quiz. Once complete you press Finish button to complete the test. After completion of test you can see your quiz result with sharing option, You can share your quiz result to social media like Facebook, Instagram etc. Note: You can view all the answers at the end of this quiz. Best of luck for LTE Java Basics Quiz 1 Which component is responsible for converting bytecode into machine specific code? JRE JDK JVM JIT 2 How to sort the elements of ArrayList? listObj.sort() Collection.sort(lsitObj) Collection.sort(listObj) Sorter.sortAsc(listObj) 3 Is hashmap an ordered collection? False True 4 What will happen of two thread of same priority are called to be processed simultaneously? It is dependent on the operating system None of them will be executed Both of them will be executed Anyone will be executed first lexographically 5 Which of the below is not a memory leak solution? Code changes JVM parameter tuning GC Parameter tuning Process restart 6 Map Implements collection interface? True False May Be 7 What happens if constructor of class A is made private? Inherited class can instantiate objects of class A Any class can instantiate objects of class A Classes within the same package as class A can instantiate objects of class A Objects of class A can be instantiated only within the class where it is declared 8 Which of these keywords are used to implement synchronization? synchronize synchronized syn synch 9 Which of the following is a correct constructor for the thread? Thread (Runnable a, ThreadGroup t) Thread (Runnable a, int priority) Thread(Runnable a, String str) Thread (int priority) 10 Which of these method is used to reduce the capacity of an ArrayList Object trimTosize() trim() trimSize() trimToSize() 11 Which of the following will ensure the thread will be in running state? Thread.killThread() yield() wait() notify() 12 What is these keywords must be used to inherit a class? this extent extends super 13 Which of the below does not implement Map Interface ? HashMap EnumMap Vector Hashtable 14 What is the use of Interpreter? They are intermediate between JIT and JVM They convert bytecode to machine language code It is a synonyms of JIT They read high level code and execute them 15 Which of these data types is used by operating system to manage the Recursion in java? Queue Array Tree Stack 16 Which of these access specifiers must be used for main() method None public protected private 17 Which of these method waits for the thread to terminate? stop() sleep() join() isAlive 18 Which of these are types multitasking? None Process and Thread based Process based Thread based Please fill in the comment box below.