G
George Kooper
I have installed Java from Sun site to my Windows XP .
I have modified the PATH statement to include:
C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program
Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft
VisualStudio\VC98\bin;C:\j2sdk1.4.2_03\bin;
I have 2 files in my directory:
Person.class:
class Person {
String name;
int age;
}
and
Customer.java:
class Customer extends Person {
// Inherits name and age
// automatically from Person
int custId;
String phone;
}
I compile Person.java
and get good compile:
D:\javaschool\Labs\02_JavaDataTypes\Starter>javac Person.java
but when I compile Customer.java; I get error.
D:\javaschool\Labs\02_JavaDataTypes\Starter>javac Customer.java
Customer.java:1: cannot resolve symbol
symbol : class Person
location: class Customer
class Customer extends Person {
^
1 error
apparently it doesnot understand the word extends?????
Thanks
I have modified the PATH statement to include:
C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program
Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft
VisualStudio\VC98\bin;C:\j2sdk1.4.2_03\bin;
I have 2 files in my directory:
Person.class:
class Person {
String name;
int age;
}
and
Customer.java:
class Customer extends Person {
// Inherits name and age
// automatically from Person
int custId;
String phone;
}
I compile Person.java
and get good compile:
D:\javaschool\Labs\02_JavaDataTypes\Starter>javac Person.java
but when I compile Customer.java; I get error.
D:\javaschool\Labs\02_JavaDataTypes\Starter>javac Customer.java
Customer.java:1: cannot resolve symbol
symbol : class Person
location: class Customer
class Customer extends Person {
^
1 error
apparently it doesnot understand the word extends?????
Thanks