> Need help with Java Eclipse Project: Prime and Composite number.?

Need help with Java Eclipse Project: Prime and Composite number.?

Posted at: 2014-06-09 
Hi, I need help for my Intro to Computer Programming class project, in which I must create a program which asks the user to input a number between 1 and 200, in which the computer will reply to the user and tell him/her if the number he/she input is prime or composite. I really have no idea what to do, as I've tried multiple things, all which have failed. Side note: My intro to computer programming teacher fails to teach at all. Most of the kids in my class are overall dissatisfied with her, and want her fired. Any help at all will be greatly appreciated.
public static void main(String[] args) { int j = 2; int result = 0; int number = 0; Scanner reader = new Scanner(System.in); System.out.println("Please enter a number: "); number = reader.nextInt(); while (j <= number / 2) { if (number % j == 0) { result = 1; } j++; } if (result == 1) { System.out.println("Number: " + number + " is Not Prime."); } else { System.out.println("Number: " + number + " is Prime. "); } } ------------------------------ one of my more favorite sites for java related issued: http://stackoverflow.com/questions/19514680/prime-number-test-java