posted 16 years ago
The System.out.println in class pdos throws error as
C:\Java>javac Pdog.java
Pdog.java:12: cannot resolve symbol
symbol : method name ()
location: class Dog
System.out.prinln(dg.name());
If i swap the dg.name with "hello". then the compiler doesn't throws any error.