FREE E LEARNING PLATFORM
HOMEEXCEPTIONSOOPSJVMINTRO
 

I.C.S.E Board Java objective questions practise Paper




31. The explicit keyword takes how many arguments?

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

32. What is false about constructor ?

  1. Constructor cannot be synchronized in java
  2. Java does not provide default copy constructor
  3. Constructor can have a return type
  4. this and super keywrd can be used in a constructor

33. What is true about copy constructor

  1. Used when a function returns an object
  2. It can be defined with zero arguments
  3. The argument reference is passed by reference
  4. Used when object is passed by value to a function

34. Abstract class cannot have a constructor

  1. True
  2. False
  3. Both
  4. None

35. Which is odd in given option

  1. system
  2. object
  3. main
  4. strictfp

36. The purpose of a java constructor is

  1. Initialization of variables with passed data
  2. writing custom code
  3. Accepting oother objects as input
  4. All the above

37. Which is odd in given option

  1. student class{}
  2. class teacher{ public: teacher(int a){}}:
  3. class student{ public: student(int a){}}:
  4. None of the above

38. What is the initial quatity of the arraylist list?
arraylist list = new arraylist();

  1. 10
  2. 0
  3. 100
  4. 5

39. Which is odd in given options

  1. int var;
  2. int VAR;
  3. int 1_var;
  4. int var1;

40. How many objects of the class will be created if the default constructor is not defined.

  1. Compiler provides the default constructor to build the object.
  2. The compiler will generate the error
  3. Error will occue at run time
  4. All the above

You may also Find this interesting

Java Set 1

Java Set 2

JAVA Practise Paper Set 1 Answers

JAVA Practise Paper Set 2 Answers

JAVA Practise Paper Set 3 Answers







Leave Comment