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