I.C.S.E Board Java objective questions practise Paper 3 Answers
21. Which is odd in given option
- Function
- Method
- A block of code in {}
- Package
22. A function that modifies its parameters is
- Virtual function
- Pure function
- Impure function
- None
Pure functions :
Pure functions take objects and/or primitive data types as arguments but does not modify the objects.Pure functions doesn't have side effects.
Impure Functions: Impure functions change the state of received objects.
Impure functions have side effects.
23. The prototype of a function take ( that returns an int and receives an array ) is
- Public int take ( int ar [])
- Public int take ( int ar )
- Public int take ( int int ar [])
- None of the above
24. Given the code int Change(int p, int q)
- Change(10,20)
- R = Change(10,20)
- Change(10.5, 12. 5 )
- None
25. Which is odd in given option
- Import statement
- Function prototype
- Signature of a function
- Function Declaration
26. Which of the following is used to call default contsructor in java
- super()
- that()
- sub
- This
27. Which principal in Object Oriented Programming is followed during Java Constructor Overloading
- Polymorphism
- Encapsulation
- Inheritance
- None
28. Which is od in the given option
- Use of pointers
- Dyanmic
- Object Oriented
- Architectural Neutral
29. What is the output if this() and super() is used in the method
- Compile Time Error
- Run Time Error
- Throws Exception
- Runs Succesfully
29. A constructor is initialized when
- There is a constant variable in the class
- There is a reference variable in the class
- There is an object of another class , and other class doesn't have a default constructor
- All the above
30. In derived class, can the constructor be overloaded
- Yes, if the derived class have no constructor
- Yes, always
- No
- Both a and b
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