Does Java have an implementation for complex numbers? No, it doesn’t have a dedicated class. It’s strange but not all that strange (complex number implementation is trivial); the JDK does not have one, but here is an implementation I have written:
https://github.com/mcaliman/JavaComplexNumber
However, there are third-party libraries for working with complex numbers, for example:
Apache Commons http://commons.apache.org/proper/commons-math/userguide/complex.html
My project is a work in progress. Stay tuned! Next implementation: Generics, support for BigDecimal. What would you like me to add?
