If the number is less than 2 return false If the number is equal to 2 return true If the number is divisible by 2 return false Loop through the odd numbers from 3 to the square root of the number If the number is divisible by the loop index Return false Return true

double x = Math.sqrt(25.0);

String s = new String("123"); int n = Integer.parseInt(s);