public class FunMath
{
public double number;
}
public class TestFunMath
{
public static void main(String[] args)
{
FunMath n = new FunMath();
Type: Posts; User: helloworld922
public class FunMath
{
public double number;
}
public class TestFunMath
{
public static void main(String[] args)
{
FunMath n = new FunMath();
You never set number inside FunMath, but rather set a local variable which happens to have the same name as number inside your main method.