Search:

Type: Posts; User: JohnBowers

Search: Search took 0.10 seconds.

  1. Re: Practicing before taking a class(Exception in thread "main" java.lang.NullPointer

    That part actually compiled okay, it's just the ending print out always comes back as 0.
  2. Re: Practicing before taking a class(Exception in thread "main" java.lang.NullPointer

    Thank you for the answer, I was able to get my code to finish without any interferences, however it does not work correctly. The finalPrime always equals 0 for some reason, do you have any idea why...
  3. Practicing before taking a class(Exception in thread "main" java.lang.NullPointer...)

    public class primes
    {
    // instance variables - replace the example below with your own
    private static int[] primes;
    private static int numPrimes;
    private static int ndx;
    ...
Results 1 to 3 of 3