Hey, i have a much larger program however it was giving me this 1 error, i tried to just get that 1 part working however i keep failing. I know im probally missing something very simple. My code is:
class Number {
private int number = 0;
public void Pie(int numIn){
number = numIn;
}
public int getNum(){
return number;
}
}
public class Test {
public static void main(String[] arg) {
Number n1 = new Number(15);
System.out.println(n1.getNum());
}
}
Whenever i try to compile i get this error:
cannot find symbol constructor Number(int)
on line 15, which is
Number n1 = new Number(15);
so for some reason my code doesnt like me creating a new class. Any suggestions on how i can fix this, probally something very simple im just forgetting to do.