Computer Applications
Which of the following is NOT true for polymorphism?
- All methods have the same name.
- Methods are invoked based on the arguments.
- Methods should have the same number and the same type of arguments.
- It is a principle of OOPs.
Related Questions
Which of the following String methods has integer argument?
(i) length
(ii) substring
(iii) indexOf
(iv) charAt- Only (ii)
- (i) and (iv)
- (ii) and (iv)
- (iii) and (iii)
Assertion: Property by virtue of which one class acquires the properties of another class is termed as Inheritance.
Reason: Inheritance promotes reusability.
- Assertion is true, Reason is false.
- Assertion is true, Reason is true.
- Assertion is false, Reason is false.
- Assertion is false, Reason is true.
Which of the following is a valid initialisation statement?
- int x = "GOOD";
- int y = 45.0/2;
- int z = (int)'x';
- int m = false ;
Which of the following is a valid statement to print the following sentence:
Raj said "Good morning"
- System.out.println("Raj said "Good morning");
- System.out.println("Raj said \\Good morning\\);
- System.out.println("Raj said \"Good morning\" ");
- System.out.println("Raj said Good morning");