Amigos, fiz os seguintes arquivos :
Person.java
package com.jcw;
public class Person
{
public static void main(String args[])
{
Human someone = new Human();
Rat somerat = new Rat();
somerat.HaveDisease =true;
someone.year_birth = 56;
System.out.println(someone.year_birth);
System.out.println(somerat.HaveDisease);
}
}
Rat.java
package com.jcw;
class Rat
{
boolean HaveDisease;
}
Human.java
package com.jcw;
class Human
{
int year_birth;
}
na hora de compilar com :
javac -cp . -d . Person.java
eu recebo isto :
$ javac -cp . -d . Person.java
Person.java:7: cannot find symbol
symbol : class Human
location: class com.jcw.Person
Human someone = new Human();
^
Person.java:7: cannot find symbol
symbol : class Human
location: class com.jcw.Person
Human someone = new Human();
^
Person.java:8: cannot find symbol
symbol : class Rat
location: class com.jcw.Person
Rat somerat = new Rat();
^
Person.java:8: cannot find symbol
symbol : class Rat
location: class com.jcw.Person
Rat somerat = new Rat();
^
4 errors
Qual o problema ??