Answer Posted / shiry
In C++ ;
if i have 2 clases
class A {
int x();
}
class B : public A {
int x();
}
void main(){
A* a = new B() ;
a.x(); // it will call the method of the super class A
// not B but in java it will call the method in the
// child B why ??
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
is it possible to instantiate the math class?
what do you mean by stream pipelining in java 8? Explain
What are use cases?
Write code to implement bubble sort in java?
What is private static in java?
Are floats faster than doubles?
What is default constructors?
How do I get 64 bit java?
Which arithmetic operations can result in the throwing of an arithmeticexception?
What is difference between length and length() method in java ?
What is the differences between heap and stack memory in java? Explain
What does this mean java?
Is object a data type?
Explain wait() method of object class ?
What are the advantages of arraylist over arrays?