No Tribble At All
From Huben's Wiki
Line 47: | Line 47: | ||
{ | { | ||
// Complex c1 = new Complex(); | // Complex c1 = new Complex(); | ||
− | |||
− | |||
− | |||
− | |||
// implement toString before proceding further | // implement toString before proceding further | ||
// System.out.println(c1); // 0.0+0.0i | // System.out.println(c1); // 0.0+0.0i | ||
+ | // Complex c2 = new Complex(3); | ||
// System.out.println(c2); // 3.0+0.0i | // System.out.println(c2); // 3.0+0.0i | ||
+ | // Complex c3 = new Complex(-2, -5.5); | ||
// System.out.println(c3); // -2.0-5.5i | // System.out.println(c3); // -2.0-5.5i | ||
+ | // Complex c4 = new Complex(2, 3); | ||
// System.out.println(c4); // 2.0+3.0i | // System.out.println(c4); // 2.0+3.0i | ||
+ | // Complex c5 = new Complex(c4); | ||
// System.out.println(c5); // 2.0+3.0i | // System.out.println(c5); // 2.0+3.0i | ||
// System.out.println(c3.getReal()); // -2.0 | // System.out.println(c3.getReal()); // -2.0 |