value1 = txtDisplay.getText(); //value 1 declared as a double.
if(String.valueOf(value).contains(".")){
//then do something.........
}
Hi there, just trying to find a way to test if a variable (value1) holds a decimal from user input.
This doesn't compile, just tried converting the double (value1) into a string then test it using .contains method.