I.C.S.E Board Java objective questions practise Paper 2 Answers
11. It is compulsory to return a value from a function
- True
- False
- True - if it is a pure function
- False - if it is a impure function
Answer: b. False
12. Alternative way to send multiple values from a function is
- Arrays
- Tuples
- List
- None
Answer: a. Arrays
13. The default return type of a user defined function :
- Float
- Int
- Void
- Null
Answer : Int
14. Keyword used to return a value in a function is
- New
- Return
- Retruns
- static
Answer : Return
15. Static functions can access
- Static data member
- Non static data members
- Both static and non static data members
- None
Answer : a. Static data member
16. A function name can begin with
- An alphabet
- Sign
- a Digit
- Space
Answer : a. An Alphabet
17. A function in java can be written as
- Inside a class
- Outside a class
- Inside main function
- None
Answer a. Inside a class
18. An overloaded function is
- a. A function same name but different return types
- b. A function with same name but different number of parameters
- c. A function with the same name but different types of parameters
- d. Both ( b ) and ( c )
Answer d. Both (b) and ( c )
19. Which is odd in given option
- Function Overloading
- Polymorphism
- Inheritance
- Operator Overloading
Answer : Inheritance
20 A local variable of a function have more priority than
- Variable defined globally
- Variable defined in imported class
- Variable defined in main () function
- All the above
Answer All the above
You may also Find this interesting
JAVA Practise Paper Set 1 Answers
JAVA Practise Paper Set 2 Answers
Leave Comment