Welcome to your JAVA SET - 1 1. Which of the following is a reserved keyword in Java? object main strictfp system None 2. Which thread is executed in the background? New thread User-created thread Daemon thread All of these None 3. What is garbage collection in java? Method to manage memory in java Create new garbage values Delete all values All of these None 4. Which of the following is a marker interface? Runnable interface Readable interface Remote interface Result interface None 5. Which of the following option leads to the portability and security of Java? Bytecode is executed by JVM The applet makes the Java code secure and portable Use of exception handling Dynamic binding between objects None 6. What is a comparator in Java? Interface to compare integer Interface to compare two objects in java Comparison method for lists All of these None 7. What are the types of memory allocated in memory in java? Heap memory Stack memory Both A and B None of these None 8. What is the use of the intern() method? It creates a new string in the database It returns the existing string from memory It modifies the existing string in the database None of the above None 9. JRE stands for ___. Java run ecosystem Java Runtime Environment JDK runtime Environment None of these None 10. Multithreading in java is ___. Executing multiple processes simultaneously Creating more threads at a time Blocking threads All of these None 11. What will be the output of following Java code? 1000.6 100.6 2000.6 200.6 None 12. Object in java are ___. Classes References Iterators None of these None 13. Which of these is true for interfaces in java? The keyword interface is used to create a method All the methods of an interface are abstract It does not contain constructors All of these None 14. BigInteger Class is used to ___. Store very long range of number A class that stores large range of integer Store integer values All of these None 15. What makes the Java platform independent? Advanced programming language Class compilation It uses bytecode for execution All of these None 16. Which of the following is not a Java features? Dynamic Architecture Neutral Object-oriented Use of pointers None 17. JDK stands for ____. Java development kit JavaScript deployment kit Java deployment kit None of these None 18. Which Java method is used to convert an object to string? createString() object.string() newString() toString() None 19. Which of these is a property of threads in Java? Multiple threads can be executed concurrently Has its own priority Both A and B None of these None 20. In which memory a String is stored, when we create a string using new operator? String memory Heap memory Stack Random storage space None 21. Encapsulation is ___. Wrapping up of data and related functions into a single entity Creating special methods Creating special data structure All of these None 22. Which method in Java is used to check for NaN values? checkNan() isNan() isNotNan() All of these None 23. Static variables in java are declared as ___. Constants new variables final variables All of these None 24. What will be the output of the following program? 10, 5, 0, 20, 0 60, 5, 0, 20 10, 30, 20 60, 30, 0, 20, 0 None 25. .What should be the execution order, if a class has a method, static block, instance block, and constructor, as shown below? Instance block, method, static block, and constructor Method, constructor, instance block, and static block Static block, method, instance block, and constructor Static block, instance block, constructor, and method None Share this:TweetEmailTelegramPrintWhatsAppLike this:Like Loading... Related Posts (You May Also Read):