问题描述
- Java 小代码问题 Java编程
-
public class Something {
public static void main(String[] args) {
Something s = new Something();
System.out.println("s.doSomething()returns"+doSomething());} public static String doSomething(){ return"DO something..."; }
}
为什么加static 静态块 syso里面的doSomething()就能通过
时间: 2024-10-29 22:39:33