码迷,mamicode.com
首页 > 其他好文 > 详细

类内方法调用自身

时间:2017-08-19 12:37:10      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:new   oid   print   str   方法调用   method   todo   int   class   

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");
}
}

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

类内方法调用自身

标签:new   oid   print   str   方法调用   method   todo   int   class   

原文地址:http://www.cnblogs.com/tianzijiaozi/p/7395922.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!