anirudh jagithyala wrote:
int/double=double;;;;double/int=double
therefore 3/2d=3/2.0=1.5(double)=1.5
d2=1.5
Hope it is clear
kurt hanni wrote:You are running Parent class, you dont have a main method in your Parent class
Hareendra Reddy wrote:Hello Vidya sumanasekara ,
The problem here is this line
Now b is interpreted by compiler as 2-D array i.e b[][] ,
notice that a array if int type and b array of array of ints ..
HTH
Hennry Smith wrote:
When we try to compile this code, the compiler says something like this:
cannot find symbol
The compiler is saying, "Hey, class Animal doesn't have a playDead() method".
Let's modify the if code block:
if(animal instanceof Dog) {
Dog d = (Dog) animal; // casting the ref. var.
d.playDead();
}
Please explain i am not able to understand this concept...???