Monday 19 March 2012

Internet, Web Programming and Java MCQ 07


  1. The concepts of OOP are:

    1. Abstraction
    2. Encapsulation
    3. Inheritance
    4. All of these

  1. A  class is a_____

    1. System defined
    2. User defined
    3. Server defined
    4. None of these

  1. The variables declared in the class are known as_____

    1. Instance integer
    2. Instance float
    3. Instance variable
    4. None of these

  1. The variables and methods declared within the ________

    1. Parenthesis
    2. Curly braces
    3. Braces
    4. None of these

  1. To access the variables and methods outside the class, the _____ operator is used as follows:

    1. Semicolon
    2. Colon
    3. Dot
    4. None of these

  1. How many methods we used to passed the argument?

    1. 1
    2. 2
    3. 3
    4. 4

  1. The name of argument passing method:

    1. Call by value
    2. Call by reference
    3. Both a & b
    4. None of these



  1. The argument that appear in the method call statement are known as:

    1. Formal arguments
    2. Actual arguments
    3. Informal arguments
    4. None of these

  1. Which appear in the method definition are known as:

    1. Formal arguments
    2. Actual arguments
    3. Informal arguments
    4. None of these

  1. A _______ has the same relation to an  ______ that a basic data type has to a variable of that type.

    1. Class, object
    2. Class, method
    3. Object, method
    4. None of these

  1. Which of the operators is used for creating an object and allocating memory space to it?

    1. Dot operator
    2. New operator
    3. Instance of operator
    4. None of these

  1. Which of these entities is the correct syntax for accessing the members of a class?

    1. class.member.class_object
    2. class_object.class_name
    3. class_name.class_member
    4. class_object.class_member

    1.  
  1. The ________ method allows the programmer to pass different values to the instance variables of different objects.

    1. Parameterized
    2. Integer
    3. Data types
    4. None of these

  1. The return type of a constructor is

    1. Void
    2. Float
    3. Int
    4. None of these


  1. The process of  _____ allows multiple methods to have same name with different parameters and different definitions.

    1. Method overloading
    2. Method overriding
    3. Method hiding
    4. None of these

  1. Which of these is a valid method declaration?

    1. int sum(int x, int y)
    2. int sum(int x, y)
    3. sum(int x, int y)
    4. sum(int, int)

  1. The ______ data members of a class are independent of any particular object of the class.

    1. Dynamic
    2. Static
    3. Both of these
    4. None of these

    1.  
  1. The _____ keyword is used to refer to the current object.

    1. new
    2. this
    3. that
    4. none of these

  1. Objects are variables of class type_______ which they are created.

    1. Outside
    2. Inside
    3. Medium
    4. None of these

  1. Java provides a mechanism known as _______ collection.

    1. Real
    2. Garbage
    3. Duplicate
    4. None of these

  1. Method overloading allows _________ methods to have the same name with different parameters and different definitions.

    1. Single
    2. Multiple
    3. Double
    4. None of these

  1. The syntax to access static variable is:

    1. class.name.variable_name
    2. class_name.variable_name
    3. class_name_variable_name
    4. None of these


  1. All the operations that are to be performed just before the object is destroyed, are placed inside the _________() method.

    1. Finalize
    2. Final
    3. Virtual
    4. None of these

  1. It refers to the ability of an action or method to perform different operations on the object that it is acting upon. That is called ______

    1. Method riding
    2. Polymorphism
    3. Finalize method
None of these

No comments :

Post a Comment