Well friends, I was using two classes:
Funcionario.java
(class 1, from the /home/lcs/Documentos/java/exercicio3
directory) and UtilizandoFuncionario.java
(class 2, from the /home/lcs/Documentos/java
directory).
So far so good, I used in class 2 the command import exercicio3.Funcionario;
and it worked perfectly, but when I put class 2 in the directory /home/lcs/Documentos/java/exercicio4
the command stopped working and started to give error in the terminal. >
I would like to know how to use the Employee class in the Employee class in the new directory, in the /home/lcs/Documentos/java/exercicio4
?
package exercicio3;
public class Funcionario {
private int matricula;
private double salario;
//RESTO DO CÓDIGO ...
}
package java;
import exercicio3.Funcionario;
public class UtilizandoFuncionario {
public static void main(String ... args){
//RESTO DO CÓDIGO ...
}
}
I used it to compile:
Documentos/java/exercicio4$ javac UtilizndoFuncionario.java