JAVA

A visually appealing digital artwork of a developer working on Java code, with colorful code snippets in the background, representing programming and technology.

Test Your Java Knowledge!

Welcome to the Java Quiz! This fun and engaging quiz consists of 10 multiple-choice questions designed to test your understanding of Java programming concepts. Whether you are a beginner or a seasoned developer, challenge yourself and see how much you really know!

  • 10 multiple-choice questions
  • Immediate scoring and feedback
  • Great for Java enthusiasts!
10 Questions2 MinutesCreated by CodingWizard42
1. How many primitive data types are there in JAVA?
A. 6
B. 7
C. 8
D. 9
2. Automatic type conversion in JAVA takes place when?
A. Two type are compatible and size of destination type is shorter than source type.
B . Two type are compatible and size of destination type is equal of source type.
C. Two type are compatible and size of destination type is larger than source type.
D. All of the above.
3. Which of the following options is the best for generating random integer 0 or 1 ?
A. (int)Math.random()
B. (int)Math.random()+1
C. (int)(Math.random() + 0.5)
D. (int)(Math.random() + 0.2)
4. The variables declared in a class for the use of all methods of the class are called
A. Reference variables
B. objects
C. Instance variables
D. None of these.
5. In which area of memory, the system stores parameters and local variables whenever a method is invoked?
A. Heap
B. Storage Area
C. Stack
D. Array
6. The finalize() method is called just prior to
A. An object, variable or method goes out of scope.
B. An object or variable goes out of scope.
C. A variable goes out of scope.
D. Before garbage collection.
E. None of the above.
7. Which of these is a legal definition of a method named examveda assuming it throws IOException, and returns void. Also assume that the method does not take any arguments. Select the one correct answer.
A. Void examveda() {} throws IOException
B. Void examveda() throws IOException{}
C. Void examveda() throw IOException{}
D. Void examveda(void) throws IOException{}
E. examveda() throws IOException{}
8. The implicit return type of a constructor is
A. Void
B. A class object in which it is defined.
C. There is no return type.
D. None of the above
9. What is Math.floor(3.6)?
A. 3.0
B. 3
C. 4.0
D. 4
10. Which of the modifier can't be used for constructors?
A. public
B. private
C. static
D. protected
{"name":"JAVA", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the Java Quiz! This fun and engaging quiz consists of 10 multiple-choice questions designed to test your understanding of Java programming concepts. Whether you are a beginner or a seasoned developer, challenge yourself and see how much you really know!10 multiple-choice questionsImmediate scoring and feedbackGreat for Java enthusiasts!","img":"https:/images/course1.png"}
Powered by: Quiz Maker