Assignment #106 and Finding Prime Numbers

Code

///John Mulligan
///period 5
///Program Name: PrimeNumber
///File Name: PrimeNumber.java


public class PrimeNumber
{
    public static void main( String[] args )
    {
        for ( int n = 1; n <= 20; n++ )
        {
            if (isPrime(n)) {
                System.out.println( n + " <");

            } else {
                System.out.println( n );
            }
        }   
    }

    public static boolean isPrime (int n )
    {
        for (int x = 2; x < n;x++)
        {
            if (n%x == 0) 
            {
                return false;
            }
        }
        return true;
    }
}