Without the abstract modifier, the compiler expects the method to have a body and if it did not find one, it will complain. The abstract keyword is a clue to to compiler to not expect a body for the method.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
I think it's a foolish question, i know all the methods in Interface are abstract that is why we don't have to mention JVM a method as abstract.
But in case of abstract class an un implimented method is by default abstract why we have to mention abstract infornt of those methods? Why JVM iss not recognizing those methods as abstract(same as interfcae)?
And we are alos suupplying an additional information to JVm by mentioning class as abstract
No, an unimplemented method might be a syntax errorIs the second part of that code the body of foo() which has a semicolon entered by mistake or is it an instance initialiser following the abstract method foo()?
∴ You do not allow unimplemented methods even in abstract classes, unless they have been marked abstract. That is how the compiler is programmed, and I presume that is how the Java® Language Specification defines an abstract method.