Prime Directive Testing not working

Hi,

I having real issues with the testing stage of this exercise. I’ve written out my code which I believe to be correct and which should run but then I compile the file with ‘java PrimeDirective’ nothing happens. I don’t even get an error.

I’ve commented out pretty much all of my code and I’m trying to get the method to just print the number passed in as a parameter to the screen but still nothing.

Not sure if this is a bug in the actual website itself or? Anyone else had this issue?

My code is below:-

// Import statement:
import java.util.ArrayList;

class PrimeDirective {
  
  // Add your methods here:
  public boolean isPrime (int number) {
    system.out.println(number);
    //if (number == 2) {
      //return true;
    } /**else if (number < 2) {
        return false;
    }
    for (int i = 2; i < number; i++) {
      if (number % i == 0){
        return false;
      }
        return true;
 
    }*/
  }

Any assistance would be much appreciated.

system.out.println(number);

Should be a capital S in system.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.