猿问

这是错哪了?

package com.imooc;


public class sayhello {


public static void main(String[] args) {

// TODO Auto-generated method stub

sayhello anybody=new sayhello();

anybody.hello();

anybody.hello("小明");

}

public void hello() {

System.out.println("hello!");

}

public void String(String name) {

System.out.println("hello,"+name+"!");

}


}

溯源1
浏览 1166回答 2
2回答

萧欢打靶把营归

第二个函数 void String()应该敲错了
随时随地看视频慕课网APP

相关分类

Java
我要回答