1.
Do you know who created and designed Java?
Correct Answer
A. James Gosling
Explanation
James Gosling is the correct answer to the question. He is widely known as the creator and designer of the Java programming language. Gosling, along with his team at Sun Microsystems, developed Java in the mid-1990s. His contributions to the language's design and development have had a significant impact on the world of programming.
2.
Java applications are typically compiled to bytecode that can run on?
Correct Answer
C. Java virtual machine
Explanation
Java applications are typically compiled to bytecode, which is a platform-independent format. This bytecode can be executed on any device or operating system that has a Java Virtual Machine (JVM) installed. The JVM acts as an interpreter, converting the bytecode into machine-specific instructions that can be executed by the underlying hardware. Therefore, the correct answer is Java virtual machine.
3.
Which method is the starting point for all java programs?
Correct Answer
A. Main
Explanation
The "Main" method is the starting point for all Java programs. It is the method where the program begins execution. When a Java program is run, the JVM (Java Virtual Machine) looks for the "Main" method and starts executing the code inside it. This method acts as an entry point for the program and allows the developer to define the initial instructions to be executed.
4.
An example of variable a string can contain is a?
Correct Answer
C. Name
Explanation
A string variable can contain a name, as names are typically represented as a sequence of characters. This allows for storing and manipulating names in a program.
5.
What is an object that represents a sequence of character.
Correct Answer
B. String
Explanation
A string is an object that represents a sequence of characters. It is used to store and manipulate text in programming languages. Strings can contain letters, numbers, symbols, and spaces. They are often used for tasks such as storing user input, displaying messages, and manipulating data. In this context, the other options (Int, Char, Boolean) do not represent a sequence of characters, making String the correct answer.
6.
Which of the following organisations own java?
Correct Answer
A. Oracle
Explanation
Oracle is the correct answer because Oracle Corporation is the organization that owns Java. Java was originally developed by Sun Microsystems, which was later acquired by Oracle in 2010. Since then, Oracle has been the primary steward and owner of the Java programming language and platform. Microsoft and Amazon are not the owners of Java, and "Java" itself is not an organization but rather the name of the programming language.
7.
In Java, every line of code that can actually run needs to be inside a
Correct Answer
C. Class
Explanation
In Java, every line of code that can actually run needs to be inside a class. In Java, a class is a blueprint for creating objects, and it contains the code that defines the behavior and properties of those objects. Therefore, any code that is meant to be executed must be written inside a class.
8.
The abbreviation JDK in java means?
Correct Answer
D. Java Development Kit
Explanation
The correct answer is Java Development Kit. JDK stands for Java Development Kit, which is a software development environment used for developing Java applications. It includes the necessary tools, libraries, and documentation needed to compile, debug, and run Java programs.
9.
The filename extension of Java includes the following except?
Correct Answer
C. .exe
Explanation
The filename extension of Java includes .jar, .java, and .class. However, .exe is not a valid filename extension for Java files. .exe is typically used for executable files in Windows operating systems, whereas Java files are compiled into bytecode and executed using the Java Virtual Machine (JVM).
10.
What was the year Java was initiated?
Correct Answer
A. 1991
Explanation
Java was initiated in 1991.