标签:lin div class public print sha str arp margin
面对对象:
public class Demo { public static void main(String[] args){ Horse h = null; h = new Horse(); // h.name = "dd"; h.eat(); h = null; //释放对象 } } class Horse{ String name; public void eat(){ System.out.println(name); } }
标签:lin div class public print sha str arp margin
原文地址:https://www.cnblogs.com/yanxiaoge/p/10656832.html