|
As explained by the previous users ,you need to have a constructor that taked an argument to make call like new Number(15).
Now, if you want to still use the same program, change the call like
Number n1 = new Number();
ni.Pie(15);
System.out.println(n1.getNum());
Note, that we have used new Number(). Every class has a default constructor with no argument and it gets called, when we create object as above.
Hope this helps!
Last edited by JAdmin : 01-25-2008 at 01:51 AM.
Reason: update
|