Quantcast
Channel: QuizMeUp - conversion
Viewing all articles
Browse latest Browse all 2

Does an object of type class can be assigned to...

$
0
0
Multiple choice question

Does an object of type class can be assigned to a variable of its sub-class type?
What will be the result of the following code:
class A {
public static void main(String [] args) {
B b = new A();
}
}
class B extends A {}


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images