View Single Post
  #5 (permalink)  
Old 01-24-2008, 08:45 PM
JAdmin JAdmin is offline
Member
 
Join Date: Jan 2008
Posts: 20
JAdmin is on a distinguished road
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
Reply With Quote