I created this class and I do not understand why this returns a 0 versus the 1 I am sending?
Thanks
public class myTest
{
private int myNumber;
public myTest()
{
int myNumber;
}
public int getMyNumber() {
return myNumber;
}
public void setMyNumber(int d) {
this.myNumber = myNumber;
}
public static void main(String[] args)
{
myTest mt = new myTest();
mt.setMyNumber(1);
System.out.println(mt.getMyNumber());
}
}
Thanks
public class myTest
{
private int myNumber;
public myTest()
{
int myNumber;
}
public int getMyNumber() {
return myNumber;
}
public void setMyNumber(int d) {
this.myNumber = myNumber;
}
public static void main(String[] args)
{
myTest mt = new myTest();
mt.setMyNumber(1);
System.out.println(mt.getMyNumber());
}
}