Search:

Type: Posts; User: helloworld922

Search: Search took 0.10 seconds.

  1. [SOLVED] Re: Taking a square root in Java, answer appears as 0.0. Why?

    public class FunMath
    {
    public double number;
    }

    public class TestFunMath
    {
    public static void main(String[] args)
    {
    FunMath n = new FunMath();
  2. [SOLVED] Re: Taking a square root in Java, answer appears as 0.0. Why?

    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.
Results 1 to 2 of 2