Java Aptitude Test

Online Test for Java Programming Multiple Choice Test Covers Java, Introduction to Java, Java for Dummies, OOPs in Java, Programming in Java

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

A ………….is a software unit that combines a structured set of data with a set of operations for inspecting and manipulating that data.

  1. class
  2. object
  3. method
  4. signature
Question 2 Multiple Choice (Single Answer)

A class declaration in JAVA looks much like a struct declaration in

  1. C
  2. Pascal
  3. Fortran
  4. PL/SQL
Question 3 Multiple Choice (Single Answer)

A …………..is a blueprint for objects, which defines a type of object according to the data, the object can hold and the operations the object can perform.

  1. class
  2. object
  3. method
  4. signature
Question 4 Multiple Choice (Single Answer)

The ________ of a method is the combination of the methods named the method’s input types (i.e. number of parameters and their types).

  1. signature
  2. class
  3. method
  4. inheritance
Question 5 Multiple Choice (Single Answer)

…..……..method is a method that defines all aspects of itself except what code executes.

  1. An instance
  2. An abstract
  3. A class
  4. None of the above
Question 6 Multiple Choice (Single Answer)

Does the Java language provide virtual method, like C++?

  1. Yes
  2. No
Question 7 Multiple Choice (Single Answer)

………..class is a class designed with implementation gaps for sub-class to fill in.

  1. An instance
  2. An abstract
  3. A class
  4. None of the above
Question 8 Multiple Choice (Single Answer)

A final class is a class that is declared with…………keywords so that it can never be sub classes.

  1. super
  2. final
  3. root
  4. none of the above
Question 9 Multiple Choice (Single Answer)

In JAVA language, the operations you can perform on an object reference is/are

  1. assigned the reference to a value
  2. invoked a method on the reference
  3. extracted a field from the reference
  4. casted the reference to another
Question 10 Multiple Choice (Single Answer)

The ……………keyword is a two-argument operator that tests whether or not, the run time type of its first argument is assignment compatible with its second argument.

  1. final
  2. super
  3. instance of
  4. implicit
Question 11 Multiple Choice (Single Answer)

…………is a class defined in the java.lang package, whereas it is a primitive data type defined in the Java language.

  1. Int
  2. Float
  3. Char
  4. Integer
Question 12 Multiple Choice (Single Answer)

Which of the following is not a reserved keyword in Java?

  1. Abstract
  2. Boolean
  3. Break
  4. Count
Question 13 Multiple Choice (Single Answer)

Which of the following is not a reserved keyword in Java?

  1. Static
  2. Switch
  3. Main
  4. Import
Question 14 Multiple Choice (Single Answer)

The………….keyword gives a class explicit access to the constructors, methods and variables of its super class.

  1. root
  2. main
  3. super
  4. implicit
Question 15 Multiple Choice (Single Answer)

Are Java objects pointer?

  1. Yes
  2. No
  3. Both (1) and (2)
  4. None of these
Question 16 Multiple Choice (Single Answer)

The……..suffix directs the compiler to create a float value from a sequence of characters representing a floating point number; otherwise the compiler would by default create either value or an int value.

  1. c or C
  2. i or I
  3. F or f
  4. D or d
Question 17 Multiple Choice (Single Answer)

Which of the following is not primitive type in Java?

  1. Double
  2. Float
  3. Large
  4. Short
Question 18 Multiple Choice (Single Answer)

Which of the following is class literal for the Primitive Type Boolean?

  1. boolean.class
  2. Boolean.type
  3. boolean.Class
  4. Boolean.Class
Question 19 Multiple Choice (Single Answer)

In a method 'invocation', Java passes

  1. arguments by reference
  2. arguments by value
  3. arguments by pointer
  4. arguments by variable
Question 20 Multiple Choice (Single Answer)

Which of the following is class instance for the Primitive Type Boolean?

  1. boolean.class
  2. Boolean.type
  3. boolean.Class
  4. Boolean.Class
Question 21 Multiple Choice (Single Answer)

Which of the following is class instance for the Primitive int?

  1. Integer.Type
  2. integer.type
  3. integer.class
  4. Integer.class
Question 22 Multiple Choice (Single Answer)

Which of the following is class literal for the Primitive Types short?

  1. short.class
  2. Short.Class
  3. short.Class
  4. short.Class
Question 23 Multiple Choice (Single Answer)

The Java Virtual Machine performs

  1. loading
  2. linking
  3. initialization
  4. none of the above
Question 24 Multiple Choice (Single Answer)

The………program is a class file dissembler that comes with the JDK (1.0.2 and 1.1)

  1. javap
  2. a applet
  3. beam
  4. java servlet
Question 25 Multiple Choice (Single Answer)

Java………………is a language of machine instructions understood by the Java Virtual Machine and usually generated (compiled) from Java language source code.

  1. javap
  2. applet
  3. beans
  4. bytecodes