Which of the following is used to call a parent class constructor from the child class constructor?
a) extends
b) this(parent classname)
c) super
d) instanceof
Created by Nancy K.A.N.
@23:08 15-Aug-2025
Which of the following is used to call a parent class constructor from the child class constructor?
a) extends
b) this(parent classname)
c) super
d) instanceof
Created by Nancy K.A.N.
@23:08 15-Aug-2025
Which of the following keywords are related to inheritance in Java?
a) this
b) super
c) class
d) interface
Created by Nancy K.A.N.
@14:16 14-Aug-2025
Java provides objects for standard input, output, and error. These are respectively in, out, and err. In which class are these objects defined or members of?
a) InputStream class
b) PrintStream class
c) System class
d) Console class
Created by Nancy K.A.N.
@11:34 12-Aug-2025
Java's main method is an entry point to a Java application. What is the return type of Java's main method?
a) int
b) float
c) void
d) double
Type your answer in the comments...
Created by Nancy K.A.N.
@14:20 09-Aug-2025
Java is a multithreaded language. Every Java thread has a priority. Every new thread is created with priority equal to the thread that created it. Thread priority plays an important role in the way threads are executed.
Which of the following is the data type of thread priority?
a) double
b) byte
c) long
d) int
e) float
Created by Nancy N.
@22:13 08-Aug-2025
Which of the following is not a thread state in Java?
a) WAITING
b) TIMED_WAITING
c) DESTROYED
d) TERMINATED
e) RUNNABLE
f) BLOCKED
g) TIMED_BLOCKED
Created by Nancy K.A.N.
@12:01 07-Aug-2025
Which of the following environment variables will you use to set the Java path?
a) PATH
b) JDK_PATH
c) JAVA_HOME
d) JAVA_PATH
Created by Nancy K.A.N.
@15:23 05-Aug-2025
Java modules are different from packages, and they add an additional encapsulation to applications. In which version of Java were modules added?
a) Java 7
b) Java 8
c) Java 9
d) Java 10
Created by Nancy K.A.N.
@16:59 02-Aug-2025
Keywords are the reserved words that have a predefined meaning in a programming language. I like to call them as action-associated or action-oriented words. Whenever you use a specific keyword, you are sure that a certain action will take place.
Java has 52 keywords, and some of the keywords are not used, like goto. Java has reserved identifiers or contextual keywords, such as exports, module, and others. And then there are literal values mistaken for keywords, like true, false, and null.
Which of the following is not a keyword of Java?
a) strictfp
b) synchronized
c) var
d) instanceof
e) volatile
Created by Nancy K.A.N.
@12:29 01-Aug-2025
Follow my blog and YouTube channel (@CodingWithNancy)