Hi everyone,
I m running program but got stuck in after if/else if statements, Jpane doesnt show anything.I couldnt figure out.
Thanks

public class FancyGuessingGame
{
   public static void main(String[] args)
   
   {
       Scanner console = new Scanner(System.in);
       
       int guess;
       int num;
       String name;
       String Guess;
          
       
       name = JOptionPane.showInputDialog(null, "Please enter your first name");
       Guess = JOptionPane.showInputDialog(null, "Please enter a guessing number");
       guess = Integer.parseInt(Guess);
       guess = console.nextInt();
       
              
       num = (int) Math.random()*10+1;
      
       
       if (guess == num)
       {
          JOptionPane.showMessageDialog (null, "You guessed the correct number");
          
  
        }
        
       else if (guess != num && guess < num ) 
        {
          JOptionPane.showMessageDialog(null, "Your guess is lower than the number. Guess again!");
      
    
        }
        
       else//(guess != num && guess > num)
       {
           
          JOptionPane.showMessageDialog(null, "Your guess is higher than the number. Guess again!");
            
        }
            
       System.exit(0);
    }

}

Which call to JOptionPane are you referring to?
Try debugging your code by adding print out statements to show execution flow and variable values as they change.

This question has already been answered. Start a new discussion instead.