Class Complex


  • public class Complex
    extends java.lang.Object
    A complex number a + bi This doesn't support any actual operations, nor does it implement Comparable. It's simply enough to store and print the number.
    • Constructor Summary

      Constructors 
      Constructor Description
      Complex​(double real, double imaginary)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getImaginary()  
      double getReal()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Complex

        public Complex​(double real,
                       double imaginary)
    • Method Detail

      • getReal

        public double getReal()
      • getImaginary

        public double getImaginary()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object