Java Programming Exercise : Prime number checker code example

These code use to check if a number is prime or not.
import java.util.Scanner;

public class EvenOddCheck {

 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  int input;
  String prime="Not Prime";
  Scanner myScanner = new Scanner(System.in);
  System.out.print("Please input number:");
  input = myScanner.nextInt();
  for(int i=2;i<Math.sqrt(input);i++){
   if(input%i!=0)
    prime="Prime number.";
    break;
  }
  System.out.print(prime);
   
 }

}

Feel free to comment here. Good luck.