1 / 6

20 Most Popular Quiz Questions on Core Java-synergisticIT

Java online test will gauge your competence in Java programming, thus helping you transform into an expert Java coder. <br><br>So, here is a compilation of core Java online test questions and answers.<br>

28352
Download Presentation

20 Most Popular Quiz Questions on Core Java-synergisticIT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 20 Most Popular Quiz Questions on Core Java Java is a high-level object-oriented language that James Gosling developed in the year 1995. This programming language is used in various scenarios like internet programming, mobile devices, games, and e-business solutions. Java is a significantly simple language with a highly readable syntax that uses English keywords in its code. Java online test will gauge your competence in Java programming, thus helping you transform into an expert Java coder. So, here is a compilation of core Java online test questions and answers. 1. Java language was initially called Oak” but was renamed Java” in 1995. a. True b. False Answer: a 2. Which of the below are reserved keywords in Java? a. goto b. array c. int d. null Answer: a & c 3.What is the correct syntax to output "Hello World" in Java? a. print ("Hello World"); b. Console.WriteLine("Hello World"); c. System.out.println("Hello World"); d. echo("Hello World"); Answer: c

  2. 4. Unchecked exceptions are checked at compile-time rather they are checked at runtime. a. True b. False Answer: b 5. Which concept of Java is achieved by combining methods and attribute into a class? a. Inheritance b.Encapsulation c. Polymorphism d. Abstraction Answer: b 6. Which method returns the interrupted flag, and then sets the flag to false if it is true? a. isInterrupted() b. non static interrupted() c. static interrupted() d. Both a & b Answer: c 7. Java can be used to create two types of programs: applications and a. servlets b. applets c. both 1 and 2 d. none of the above Answer: b 8. Which of the following statements is a disadvantage of a Java array? a. An array has its size that is known as the array length b. An array can hold primitive types of data c. An array holds only one type of data

  3. d. An array knows only its type that it contains. The array type is checked at the compile time. Answer: c 9. How do you insert COMMENTS in Java code? a. /* This is a comment b. # This is a comment c.// This is a comment Answer: c 10. Which constructor creates an empty string buffer with the specified capacity as length? a. StringBuffer(String str) b. StringBuffer() c. None of the above d. StringBuffer(int capacity) Answer: d 11. How many reserved keywords are currently defined in the Java language? a. 49 b. 48 c. 50 d. 47 Answer: a 12. Which keyword is used to create a class in Java? a. MyClass b. className c. class() d. class

  4. Answer: d 13. What is the correct way to create an object called myObj of MyClass? a. class myObj = new MyClass(); b. new myObj = MyClass(); c. MyClass myObj = new MyClass(); d. class MyClass = new myObj(); Answer: c 14. What is the following syntax used for? class Subclass-name extends Superclass-name { //methods and fields } a. Polymorphism b. Inheritance c.Encapsulation d. None of the above Answer: b 15. Which constructor creates an empty string buffer with the specified capacity as length? a. StringBuffer(String str) b. StringBuffer(int capacity) c. StringBuffer() d. None of the above Answer: b 16. Which Exception occurs when a class is not found while dynamically loading a class using the class loaders? a. NoClassDefFoundError b. ClassFoundException c. ClassNotFoundException

  5. d. ClassDefFoundError Answer: c 17. Packages are used for distributing a collection of reusable classes, usually in a format known as a Java Archive (JAR) file. a. True b. False Answer: a 18. When Java source code is compiled, each individual class is put into its own output file named after the class and using the .class extension. a. True b. False Answer: a 19. Which method returns a reference to the currently executing thread object? a. runningThread() b. currentThread() c. runnableThread() d. None of the above Answer: b 20. Which is a technique in Java in which a class can have any number of constructors that differ in parameter lists? a. Method overloading b. Operator overloading c. Constructor overloading d. None of the above Answer: c

  6. Take this Java online practice test and evaluate your proficiency in the various concepts of this efficient programming language. Java training at SynergisticIT, the best online coding Bootcamp in the Bay area, offers a comprehensive curriculum covering everything a programmer needs right from scratch! So, enroll today and experience the most exceptional breakthrough in your career.

More Related