Home
Video Series
Fast Math Tricks
Quantitative Aptitude
Class 8 Maths Videos
Class 9 Maths Videos
Class 10 Maths Videos
Reasoning Videos
Blog
Store
Register /Login
Home
Topic
Question
Which is true?
Options:
A
.
 "X extends Y" is correct if X and Y are either both classes or both interfaces
B
.
 "X extends Y" is correct if and only if X is an interface and Y is a class
C
.
 "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces
D
.
 "X extends Y" is correct if and only if X is a class and Y is an interface
Answer: Option A
Submit Your Solution Below and Earn Points !
0 Likes
Next Question
Report Problem
Share
Submit Solution
Your email address will not be published.
Required fields are marked
*
More Questions on This Topic :
Question 1.
The concept of multiple inheritance is implemented in Java byI. Extending two or more classes.II. Extending one ....and implementing one or more interfaces.III. Implementing two or more interfaces.
Question 2.
What is the result of compiling and running this program?class Mammal{ void eat(Mammal m){ System.out.println("Mammal ea....= new Horse(); Cattle c = new Horse(); c.eat(h); }}
Question 3.
Determine output:class A{public void method1(){System.out.print("Class A method1");}}class B extends A{public void metho....a = new A();C c = new C();c.method2();a = c;a.method3();}}
Question 4.
What will be the result after compiling this code?class SuperClass{ public int doIt(String str, Integer... data)throws E....main(String... args){ SuperClass sb = new Test(); sb.doIt("hello", 3); }}
Question 5.
What will be the output?class One{ final int a = 15;}class Two extends One{ final int a = 20;}public class Test extends ....void main(String args[]){ Test t = new One(); System.out.print(t.a); }}
Question 6.
What will be the output?class Parent{ public void method(){ System.out.println("Hi i am parent"); }}public class Child e....void main(String args[]){ Child child = new Child(); child.method(); }}
Question 7.
Determine output:class A{ public void printName(){ System.out.println("Name-A"); }}class B extends A{ public void printN....newPrint(b);7. }8. public static void newPrint(A a){9. a.printName();10. }11. }
Question 8.
What will be the result of compiling and executing the following program code?class Vehicle{ public void printSound(){ S....new Car(); Bike b = (Bike) v; v.printSound(); b.printSound(); }}
Question 9.
Determine output:class Small{ public Small(){ System.out.print("a "); }}class Small2 extends Small{ public Small2(){ Sys....class Test{ public static void main(String args[]){ new Small3(); }}
Latest Videos
Chapter 1 - GLOBAL STEEL SCENARIO & INDIAN STEEL INDUSTRY
Part 1 : (13-04-2024)
INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test
Part 1
Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP
Part 1 : (14-02-2024)
GPOE
Cube & Cuboid
Part 1
Reasoning (Hindi)
Data Interpretation (DI)
Basic Concept
Reasoning (Hindi)
Counting Figures Part 1
Counting Of Straight Lines
Reasoning (Hindi)
Sail E0 free webinar
Webinars
Real Numbers
Part 7
Class 10 Maths
Real Numbers
Part 1
Class 10 Maths
Polynomials
Part 1
Class 10 Maths
Latest Test Papers
Pie Chart - Test Paper 1
Data Interpretation
Reasoning & DI
Tabulation - Test Paper 2
Data Interpretation
Reasoning & DI
Test Paper 1
Direction Sense Test
Reasoning & DI
ICA , RDIC,GFM
Free Modal Test Paper - Non - Technical Branch
Old Syllabus 2022 - SAIL Junior Officer E0
GFM Combined 1
Free Revision Test
SAIL JO E-0
One click Login
Login With Google
Old way of Login
Login With Email
Submit Problem
Problem Type (Required)
Choose Problem Type
Incorrect Topic
Incomplete Question
Wrong Question
Wrong Solution
Wrong Option
Explaination : Please write a little about the issue
Submit Solution