类内方法调用自身

package ww;

public class helloword {

public static void main(String[] args) {
// TODO Auto-generated method stub
helloword hh=new helloword();
hh.s();
//s();
helloword.s();
}

public static void s(){
System.out.println("123");
}
}

//静态方法才可以调用静态方法。

posted @ 2017-08-19 11:09  天之骄子19  阅读(1080)  评论(0)    收藏  举报