Finding the imaginary part of the complex number
String imaginary = s . substring ( i + 1 , l - 1 ) ; int x = Integer . parseInt ( real ) ; int y = Integer . parseInt ( imaginary ) ; System . out . print ( Math . sqrt ( x * x + y * y ) + "NEW_LINE"); }