Java Basics Quiz May 20, 2021 Leave a Comment on Java Basics Quiz Welcome to your Java Basics Quiz. You are attempting quiz on November 30, 2023. 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. How to sort the elements of ArrayList? Collection.sort(lsitObj) listObj.sort() Sorter.sortAsc(listObj) Collection.sort(listObj) 2. Which component is responsible for converting bytecode into machine specific code? JDK JIT JRE JVM 3. Which of the following will ensure the thread will be in running state? wait() notify() Thread.killThread() yield() 4. What is these keywords must be used to inherit a class? super extends extent this 5. Which of these keywords are used to implement synchronization? syn synchronize synchronized synch 6. Map Implements collection interface? False True May Be 7. Which of these data types is used by operating system to manage the Recursion in java? Tree Array Queue Stack 8. Which of these method is used to reduce the capacity of an ArrayList Object trimToSize() trim() trimTosize() trimSize() 9. Is hashmap an ordered collection? True False 10. Which of these access specifiers must be used for main() method protected None public private 11. Which of the below does not implement Map Interface ? EnumMap Vector Hashtable HashMap 12. What will happen of two thread of same priority are called to be processed simultaneously? Anyone will be executed first lexographically None of them will be executed Both of them will be executed It is dependent on the operating system 13. What happens if constructor of class A is made private? Any class can instantiate objects of class A Inherited class can instantiate objects of class A Objects of class A can be instantiated only within the class where it is declared Classes within the same package as class A can instantiate objects of class A 14. Which of these are types multitasking? Process based Thread based None Process and Thread based 15. Which of the below is not a memory leak solution? JVM parameter tuning Process restart GC Parameter tuning Code changes 16. Which of these method waits for the thread to terminate? join() isAlive stop() sleep() 17. What is the use of Interpreter? They convert bytecode to machine language code They read high level code and execute them It is a synonyms of JIT They are intermediate between JIT and JVM 18. Which of the following is a correct constructor for the thread? Thread (int priority) Thread (Runnable a, int priority) Thread(Runnable a, String str) Thread (Runnable a, ThreadGroup t) Please fill in the comment box below.