Search:

Type: Posts; User: JavaPF

Search: Search took 0.09 seconds.

  1. Re: Need help...Missing Return Statement

    Your lucky i'm bored today ;)

    Try this:



    import javax.swing.JOptionPane;
    import java.util.ArrayList;

    public class PrimeNumber
  2. Re: Need help...Missing Return Statement

    I've used an ArrayList here to store the results and then display them with the JOptionPane.

    The JOptionPane is one massive box at the moment. You'll need to figure out how to add a new line...
  3. Re: Need help...Missing Return Statement

    Try this. Only problem is it shows each prime number one by one..



    import javax.swing.JOptionPane;

    public class PrimeNumber
    {
    public static void main (String[] args)
    {
  4. Re: Need help...Missing Return Statement

    System.out.println("Enter a value: ");
    Scanner input = new Scanner(System.in);
    int Odd = input.nextInt();
  5. Re: Need help...Missing Return Statement

    What are you expecting to happen?
  6. Re: Need help...Missing Return Statement

    Ummmm try adding:



    public static void main(String[] args){

    }


    You will need to call your boolean method from within this main method.
  7. Re: Need help...Missing Return Statement

    Hello 03EVOAWD.

    You are getting this error because of this method:



    public static boolean isPrime(int num) {

    }
Results 1 to 7 of 7