Computer Science, asked by rajeshpatwa086, 4 months ago

in a
2. How many types of constructors are available for use in general (with respect
3. In which access should a constructor be defined, so that object of the class
PART 1: MULTIPLE CHOICE QUESTIONS.
1. Which among the following helps to create a temporary instance?
A Implicit call to a default constructor
B. Explicit call to a copy constructor
C. Implicit call to a parameterized constructor
D. Explicit call to a constructor
parameters)?
A 2
B. 3
C. 4
D. 5
5. Can
of dific
6. What
To wh
7. What
8. What
9. Wha
10 How
12 Exp
13. Ach
pub
Pov
phy
)
14. W
be created in any function?
A Public
B. Protected
C. Private
D. Any access specifier will work
4. What is true about constructor?
A. It can contain return type
B. It can take any number of parameters
C. It can have any non access modifiers
D. Constructor cannot throw exception
5. What would be the behaviour if one parameterized constructor is explicitly deset
A. Compilation error B. Compilation succeeds
C. Runtime error
D. Compilation succeeds but at the time of creating object using default construct
it throws compilation error
6. What would be behaviour if constructor has a return type?
A. Compilation error B. Runtime error
C. Compilation and runs successfully
D. Only String return type is allowed
15. Po
7. Which of these method of Object class can clone an object?
A Objectcopy
B. copy)
C. Object clone
D. clonel
114​

Answers

Answered by shobhabidlan01
2

Answer:

3 types

1. How many types of constructors are available, in general, in any language? Explanation: There are 3 types of constructors in general, namely, default constructors, parameterized constructors and copy constructors. Default one is called whenever an object is created without arguments.

Similar questions