0
点赞
收藏
分享

微信扫一扫

对象的内存分析


对象的内存分析


​​package cn.itcast.review;​​​​​​​​class Person{​​​​​​​​  int id;​​​​ ​​​​  String name;​​​​​​​​  @Override​​​​ public String toString() {​​​​    return "编号:"+this.id+" 姓名:"+this.name;​​​​  }​​​​ ​​​​}​​​​​​​​public class Demo6 {​​​​ ​​​​  public static void main(String[] args) {​​​​    Person p  = new Person();​​​​   p.id= 110;​​​​    p.name = "狗娃";​​​​        ​​​​    System.out.println(p);​​​​    ​​​​  }​​​​ ​​​​}​​


对象的内存分析_对象


举报

相关推荐

0 条评论