I.C.S.E Board Java objective questions practise Paper
31. The explicit keyword takes how many arguments?
- 1
- 2
- 3
- 0
32. What is false about constructor ?
- Constructor cannot be synchronized in java
- Java does not provide default copy constructor
- Constructor can have a return type
- this and super keywrd can be used in a constructor
33. What is true about copy constructor
- Used when a function returns an object
- It can be defined with zero arguments
- The argument reference is passed by reference
- Used when object is passed by value to a function
34. Abstract class cannot have a constructor
- True
- False
- Both
- None
35. Which is odd in given option
- system
- object
- main
- strictfp
36. The purpose of a java constructor is
- Initialization of variables with passed data
- writing custom code
- Accepting oother objects as input
- All the above
37. Which is odd in given option
- student class{}
- class teacher{ public: teacher(int a){}}:
- class student{ public: student(int a){}}:
- None of the above
38. What is the initial quatity of the arraylist list?
arraylist list = new arraylist();
- 10
- 0
- 100
- 5
39. Which is odd in given options
- int var;
- int VAR;
- int 1_var;
- int var1;
40. How many objects of the class will be created if the default constructor is not defined.
- Compiler provides the default constructor to build the object.
- The compiler will generate the error
- Error will occue at run time
- All the above
You may also Find this interesting
JAVA Practise Paper Set 1 Answers
JAVA Practise Paper Set 2 Answers
JAVA Practise Paper Set 3 Answers
Leave Comment