Download Java Objective Questions and Answers 1 . Java was first developed

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Java Objective Questions and Answers
1 . Java was first developed in ?
[A] 1990
[B] 1991
[C] 1993
[D] 1996
Answer: B. 1991
Explanation:
The original and reference implementation Java compilers, virtual machines, and class libraries
were developed by Sun from 1991 and first released in 1995.It is intended to let application
developers "write once, run anywhere" (WORA), meaning that code that runs on one platform
does not need to be recompiled to run on another.
2. 2. The old name of Java was ?
[A] J language
[B] oak
[C] oct
[D] None of above
Answer: B. oak
Explanation:
The language was initially called Oak after an oak tree that stood outside Gosling's office; it
went by the name Green later, and was later renamed Java, from Java coffee, said to be
consumed in large quantities by the language's creators.
3. Which of the following feature is not supported by java ?
[A] Multithreading
[B] Reflection
[C] Operator Overloading
[D] Garbage Collection
Answer: C. Operator Overloading
Explanation:
We cannot overload the operators in java but we can overload functions in java
4. Which of the following is not keyword in java ?
[A] null
[B] import
[C] volatile
[D] package
Answer: A. null
Explanation:
null is not a keyword in java. It is a literal value
5. What is the full form of JDK ?
[A] Java Data Kit
[B] Java Defination Kit
[C] Java Development Kit
[D] Java Design Kit
Answer: C. Java Development Kit
Explanation:
it's the full featured Software Development Kit for Java, including JRE, and the compilers and
tools (like Java Doc, and Java Debugger) to create and compile programs.
6. Which command is used to compile a java program ?
[A] javac
[B] java
[C] javad
[D] .javadoc
Answer: A. javac
Explanation:
The javac command in Java compiles a program from a command prompt. It reads a Java source
program from a text file and creates a compiled Java class file. The basic form of the javac
command is "javac filename "
7. What is the full form of JVM
[A] Java Virtual Machine
[B] Java Variable Machine
[C] Java Virtual Mechanism
[D] Java Variable Mechanism
Answer: A. Java Virtual Machine
Explanation:
A Java virtual machine (JVM) is a virtual machine that can execute Java bytecode. It is the code
execution component of the Java platform.
8. What is the full form of ADT ?
[A] Abstract Data Type
[B] Abstract Development tool
[C] Abstract Design Tool
[D] Advance Development Tool
Answer: A. Abstract Data Type
Explanation:
In computer science, an abstract data type (ADT) is a mathematical model for a certain class of
data structures that have similar behavior; or for certain data types of one or more programming
languages that have similar semantics.
9. The expected signature of the main method is public static void main(). What happens if we
make a mistake and forget to put the static keyword ?
[A] The JVM issues an error saying that main method should be declared static
[B] The compiler issues a warning saying that main method should be declared static and adds it
automati
[C] The JVM successfully invokes the main method
[D] The JVM fails at runtime with NoSuchMethodError
Answer: D. The JVM fails at runtime with NoSuchMethodError
Explanation:
There is nothing special about the main method and the compiler compiles it like any other
method, so it issues no warning or error. The JVM looks for the static main method with the
expected signature, and since the static main method is missing, so it throws exception
NoSuchMehodError and terminates
10. What does the AWT stands for ?
[A] Abstract Windowing toolkit
[B] A web toolkit
[C] Application with types
[D] Absolutly wonderfull toolkit
Answer: A. Abstract Windowing toolkit
Explanation:
AWT is the original user interface provided in java.The AWT classes are provided in java.awt
package
_____________