General Knowledge Quiz on Java Variables

1) OOP stands for:
a) Observable Object Programming.
b) Object Observed Procedures.
c) Object Oriented Programming
d) Object Overloading Practices.

2) Byte code is the machine language for a hypothetical computer called the:
a) Java Byte Code Compiler
b) Java Byte Code Interpreter
c) Java Virtual Machine
d) Java Memory Machine

3) Equals 8 bits.
a) gigabyte
b) sector
c) megabyte
d) byte

4) Java allows for three forms of commenting. Which of the following are legal?
a) // single line, //...// block lines, //*...*// documentation
b) // single line, /*...*/ block lines, /**...*/ documentation
c) / single line, /* block lines, ** documentation
d) // single line, ** block lines, /*/ documentation

5) In Java, the name of the class must be the same as the name of the .java file.
a) false
b) true - but case sensitivity does not apply
c) true
d) ltrue - but additional numbers may be added to the name

6) The name Java was derived from
a) an acronym for Juxtapositioned Activated Variable Actions
b) an acronym for John's Answer for Various Accounts
c) an acronym for JBuilder Activated Variable Assembly
d) a cup of coffee

7) Which of the following feature is not supported by java?
a) Garbage Collection
b) Operator Overloading
c) Multithreading
d) Reflection

8) Which of the following is not keyword in java?
a) Netscape
b) null
c) package
d) volatile
d) import

9) What is the meaning of JDK?
a) Java Defination Kit
b) Java Design Kit
c) Java Data Kit
d) Java Development Kit
e) Java Deployment Kit

10) Which command is used to compile a java program?
a) java
b) javad
c) javac
d) javadoc
e) None of the above

11) What is the meaning of JVM?
a) Java Variable Machine;
b) Java Variable Machination
c) Java Variable Machinism
d) Java Virtual Machine
e) a and c above

12) What is the meaning of ADT?
a) Advance Development Tool
b) Abstract Development tool
c) Abstract Design Tool
d) Abstract Data Type

13) 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) Compiler exception in thread "main" java.lang.NoSuchMethodError: main
b) The compiler issues a warning saying that main method should be declared static and adds it automatically
c) The JVM successfully invokes the main method
d) The JVM fails at runtime with NoSuchMethodError bits

14) What is the meaning of AWT?
a) Abstract Windowing Toolkit
b) A Web Toolkit
c) Application WindowToolkit
d) Abstract WindowToolkit

15) Which of the following is generated when the source code is successfully compiled?
a) Byte code
b) Source Code
c) Bytecode
d) None of the above

16) The extension name of a Java source code file is?
a) .class
b) .obj
c) .exe
d) .java

17) The JDK command to compile the file is
a) java Test
b) java
c) javac Test
d) javac

18) _________ is a software that interprets Java bytecode.
a)Java debugger
b) Java API
c) Java compiler
d) Java Virtual Machine

19) Which JDK command is correct to run a MyTest.class Java application?
a) java
b) javac
c) javac MyTest
d) java MyTest

20) Java is also known as _____ generation language
a) 1
b) 2
c) 3
d) 4

21) What does javap accomplish?
a) java Interprete
b) java Disassemble
c) java compiler
d) java debugger

22) Java supports Pass by reference or Pass by value.
a) Pass by reference
b) Pass by value
c) Both
d) None of the above

23) Which is a reserved word in the Java programming language?
a) array
b) native
c) subclasse
d) method

24) instance variables are declared in
a) method
b) function
c) class
d) constructor

25) A valid Java keyword is ________________
a) char
b) String
c) Interface
d) main

26) Which class can not be subclassed in java
a) end class
b) parent class
c) Object class
d) final class

27) After compilation of the file type created is
a) .java
b) .doc
c) .txt
d) .class

28) All methods of interface are public and abstract.
a) false
b) true
c) both
d) none of the above

29) In Java, intermediate code is known as
a) class code
b) assembly code
c) interpreted code
d) Byte code

30) In Java, Interface supports multiple extends.
a) true
b) false
c) none of the above
d) both a and b

Java Introduction quiz script provided by

HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript C#