Java Basics Quiz Test your knowledge of Java, one of the most popular and versatile programming languages used for various types of application development. michelle published on November 30, 2024 Stacked 1/11 Which is a valid constructor declaration in Java? MyClass Public() public MyClass() void MyClass() public void MyClass() 2/11 Which package contains the Random class in Java? java.util java.io java.math java.lang 3/11 Which method must be implemented by all threads in Java? start() sleep() run() stop() 4/11 Which of these is NOT a Java feature? Pointers Robustness Platform Independence Multithreading 5/11 What is Inheritance in Java? Data hiding method Encapsulation of data Code reuse mechanism Abstract methodology 6/11 Who initially developed Java? Oracle IBM Microsoft Sun Microsystems 7/11 Which environment does the Java compiler produce code for? Hardware Java Virtual Machine Network Operating System 8/11 Which keyword is used to define a constant in Java? final const static constant 9/11 What is the default value of a boolean variable in Java? 0 false true null 10/11 What is the superclass of all classes in Java by default? Parent Object Class System 11/11 Which extension do Java programs use for source files? .js .java .jv .jav