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