仅当显式请求注释处理时,才接受类名“ Introductions”

我在尝试编译一个简单的Java程序时遇到了此错误消息。我知道堆栈上已经有这个问题了,但是解决方案(在编译程序时我忘了包括.java后缀)对我仍然不起作用。这是程序:


import java.io.Console;


    public class Introductions {


        public static void main(String[] args) {

            Console console = System.console();

            // Welcome to the Introductions program!  Your code goes below here

            String firstName = "Paul";

            console.printf("Hello, my name is %s\n", firstName);

            console.printf("%s this is learning how to write Java\n", firstName);

      }

    }


www说
浏览 296回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java