To convert
double
to String
in Java, use String.valueOf
.double number = 2.34;
String numberAsString = String.valueOf(doubleNumber);
if (numberAsString.equals("2.34")) {
System.out.println("Converted!");
}