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

project3 blockchain

时间:2019-02-24 10:18:14      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:rgs   net   .net   tps   public   声明   art   const   博文   

【概念】

constructor在main方法外面,main调用constructor来形成object https://blog.csdn.net/caohaicheng/article/details/14147099

public class Platypus {
    String name;
 
    Platypus(String input) {
        name = input;
    }
 
    Platypus() {
        this("John/Mary Doe");
    }
 
    public static void main(String args[]) {
        Platypus p1 = new Platypus("digger");
        Platypus p2 = new Platypus();
        System.out.println(p1.name + "----" + p2.name);
    }
}
--------------------- 
作者:hai_cheng001 
来源:CSDN 
原文:https://blog.csdn.net/caohaicheng/article/details/14147099 
版权声明:本文为博主原创文章,转载请附上博文链接!

【方法论】

【细节】

project3 blockchain

标签:rgs   net   .net   tps   public   声明   art   const   博文   

原文地址:https://www.cnblogs.com/immiao0319/p/10425211.html

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