placeholder image to represent content

Constructors

Quiz by shamal hirekurbure

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
40 questions
Show answers
  • Q1

    In Java, a constructor with no parameters or arguments is called ................ constructor.

    User-defined constructor

    Default constructor

    Static constructor

    Custom constructor

    10s
  • Q2

    Which is odd in given options

    ASCII

    none of the mentioned

    ISO-LATIN-1

    UNICODE

    10s
  • Q3

    Default constructor requires how many parameters ?

    0

    3

    2

    1

    10s
  • Q4

    Which function can be used to call default constructor in java ?

    sub()

    super()

    this()

    that()

    10s
  • Q5

    Which principal in Object-Oriented Programming is followed during Java constructor overloading

    None of the above

    Encapsulation

    Polymorphism

    Inheritance

    10s
  • Q6

    Which is odd in given options

    Dynamic

    Object-oriented

    Use of pointers

    Architectural neutral

    10s
  • Q7

    What is the output if this() and super() is used in the method ?

    Compile time error

    Runs successfully

    Run time error

    Throws exception

    10s
  • Q8

    "This" keyword is used to 

    Calling another constructor

    None of the above

    Passing itself to another method 

    Passing itself to a method of the same class 

    10s
  • Q9

    A constructor is initialized when 

    There is a reference variable in class 

    All the above

    There is an object of another class, and the other class doesn`t have a default constructor 

    There is a constant variable in class

    10s
  • Q10

    In derived class can constructor be overloaded ?

    Yes always

    No

    Both a and b

    Yes if derived class has no constructor

    10s
  • Q11

    The explicit keyword takes exactly how many arguments

    0

    2

    1

    3

    10s
  • Q12

    What is false about constructor

    "this" and "super" can be used in a constructor

    Java does not provide default constructor 

    Constructor cannot be synchronized in Java

    Constructor can have a return type

    10s
  • Q13

    What is true about copy constructor

    Used when function returns an object

    It can be defined with zero arguments

    Used when an object is passed by value to a function 

    The argument object is passed by reference

    10s
  • Q14

    Abstract class cannot have a constructor

    True

    None of these

    False

    Both a and b

    10s
  • Q15

    Which is odd in given options

    Main

    Object

    strictfp

    System

    10s

Teachers give this quiz to your class