方法创建错误

-2 java static-methods void class-method

我正在尝试为我的程序创建一个方法,当被调用时,会要求您按Enter继续.但是,BlueJ给了我一条错误信息,说"预期".以下是我的代码

注意:continue类还没有完全完成.


import java.util.Scanner;

public class BlackjackRunner

{

   public static void main (String[]args)

   {

       System.out.print("Ready to play Blackjack(y/n)? =====> ");
       Scanner input = new Scanner(System.in);
       String response = input.nextLine();
       System.out.println();
       if(response.charAt(0) != 'y' || response.charAt(0)!= 'Y')
            System.out.println("Too bad, you play");
       else
            System.out.println("Good.");  


   }

   public static void*** continue()

   {

       System.out.println("-----PRESS ENTER TO CONTINUE-----");
       Scanner wait = new Scanner(System.in);

   }

}
Run Code Online (Sandbox Code Playgroud)

BlueJ在void语句之后给出了一条错误消息(其中***).我不确定为什么这是不正确的.如果有人可以解释/帮助,那将是美好的.

dev*_*nlu 5

continue是Java中的保留关键字,更改方法名称.以下是其他保留关键字的列表:https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html