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
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
What is busy spin, and why should you use it?
What is the difference between menuitem and checkboxmenu item?
What are the two types of java?
Define an abstract class with reference to java.
Why string is not a wrapper class?
Explain the differences between static and dynamic variables?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
What is string pool?
What is a line separator in java?
What is advantage of java?
What is tochararray in java?
When should you use arraylist and when should you use linkedlist?
What is meant by collection in java?
How do I enable java in safari?