Ajay Varma

Greenhorn
+ Follow
since Jun 11, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ajay Varma

Thanks Luke for the link.... really loved some of the new features added in Java 7!!!
12 years ago
Thank you so much everyone, both the methods suggested by Seetharaman and Rameshwar Soni worked perfectly. Now my java files are compiling perfectly. Thank you for your help guys and thank you everyone for your warm welcome. This is the best forum I have come across so far.
12 years ago
Hi everyone, kindly help me with the following issue.
I am trying to complile a simple code as below.



When I compile class A using command C:\Users\Ajay\Documents\java_sandbox>javac A.java ....... it compiles fine
But when I compile Class B using the same C:\Users\Ajay\Documents\java_sandbox>javac B.java it gives the error as below....

C:\Users\Ajay\Documents\java_sandbox>javac B.java
B.java:2: error: cannot find symbol
class B extends A {
^
symbol: class A
B.java:8: error: cannot find symbol
System.out.println("The sum of i, j, k : "+(i+j+k));
^
symbol: variable i
location: class B
B.java:8: error: cannot find symbol
System.out.println("The sum of i, j, k : "+(i+j+k));
^
symbol: variable j
location: class B
3 errors


However when I compile the same code in Eclipse IDE , it works fine with no error at all. But the command prompt gives all these errors.I just don't want to touch the IDE until I complete the Core java part.
I have recently started studying Java and I am not able to compile any java file which uses extends in other words which uses Inheritance feature. Any help will be appreciated. Thanks in advance:)
12 years ago