FREE E LEARNING PLATFORM
HOMEEXCEPTIONSOOPSJVMINTRO
 

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




11. It is compulsory to return a value from a function

  1. True
  2. False
  3. True - if it is a pure function
  4. False - if it is a impure function

Answer: b. False

12. Alternative way to send multiple values from a function is

  1. Arrays
  2. Tuples
  3. List
  4. None

Answer: a. Arrays

13. The default return type of a user defined function :

  1. Float
  2. Int
  3. Void
  4. Null

Answer : Int

14. Keyword used to return a value in a function is

  1. New
  2. Return
  3. Retruns
  4. static

Answer : Return

15. Static functions can access

  1. Static data member
  2. Non static data members
  3. Both static and non static data members
  4. None

Answer : a. Static data member

16. A function name can begin with

  1. An alphabet
  2. Sign
  3. a Digit
  4. Space

Answer : a. An Alphabet

17. A function in java can be written as

  1. Inside a class
  2. Outside a class
  3. Inside main function
  4. None

Answer a. Inside a class

18. An overloaded function is

  1. a. A function same name but different return types
  2. b. A function with same name but different number of parameters
  3. c. A function with the same name but different types of parameters
  4. d. Both ( b ) and ( c )

Answer d. Both (b) and ( c )

19. Which is odd in given option

  1. Function Overloading
  2. Polymorphism
  3. Inheritance
  4. Operator Overloading

Answer : Inheritance

20 A local variable of a function have more priority than

  1. Variable defined globally
  2. Variable defined in imported class
  3. Variable defined in main () function
  4. All the above

Answer 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







Leave Comment