title: Error "the constructor HighScore(int,int,String)is undefined" ( game = new HighScore((id, score, user); )
body: <p>when run the code is shown the constructor HighScore(int, int, String)is undefined&quot;</p>
  <pre><code>import java.util.Scanner;
  
  public class HighScore{
  
      public static HighScore readGameScore(Scanner sc){
          HighScore game;
          String user;
          int id;
          int score;
  
          System.out.print(&quot;Enter game user: &quot;);
          user=sc.nextLine();
          System.out.print(&quot;Enter game ID: &quot;);
          id=sc.nextInt();
  
          do{
              System.out.print(&quot;Enter game score: &quot;);
              score=sc.nextInt();
              if(score&lt;0){
                  System.out.println(&quot;Please enter a valid value. &quot;);
              }
          }while(score&lt;0);
          *game = new HighScore(id, score, user);*
          return game;
      }
      
      public static void main(String[] args){
          Scanner sc = new Scanner(System.in);
          HighScore game;
  
          System.out.println(&quot;Enter your game score info!&quot;);
          game = readGameScore(sc);
          System.out.println(&quot;You entered: &quot;);
          System.out.println(game);
          }
   }
  </code></pre>