I am implementing a java program in ubuntu without an IDE that converts a currency to €, i have 2 classes ConvertiEuro and Valuta both in the same directory (package) called finanza, the class ConvertiEuro uses the class Valuta, when i try to compile Valuta.java it compiles correctly but when i compile ConvertiEuro.java I get an error saying "ConvertiEuro.java:3: error: cannot find symbol" I don't know why here is the code
package finanza;
public class Valuta {
private String nomeValuta;
private double totValuta;
public Valuta(String nomeVal, double totVal) {
nomeValuta = nomeVal;
totValuta = totVal;
}
public String getNomeValuta() {
return nomeValuta;
}
public double getTotValuta() {
return totValuta;
}
}
package finanza;
import finanza.Valuta;
public class ConvertiEuro {
private int valuteGestibili;
private int cont = 0;
private Valuta [] valutas;
public ConvertiEuro(int valuteGest) {
this.valuteGestibili = valuteGest;
this.valutas = new Valuta [this.valuteGestibili];
}
public boolean impostaValuta(Valuta val){
if(cont<valuteGestibili) {
this.valutas[cont] = val;
cont ++;
return true;
}
else {
return false;
}
}
}
and this how I compile: javac ConvertiEuro.java