Java eclipse String Error

前端 未结 5 819
夕颜
夕颜 2021-01-19 10:16

I\'m New to Java and I am following some instruction, However When I get to the Strings section

public class String {
    public static void main(S         


        
5条回答
  •  花落未央
    2021-01-19 11:07

    Since your class is named String, it is being inferred by the compiler as the argument type of your main method.

    Try fully qualifying the argument type instead:

    public static void main(java.lang.String[] args) {
    ...
    

    Or better yet, rename your class to use and non-java.lang class name.

提交回复
热议问题