A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

拜托各位大神?

4 个回复

倒序浏览
先拿出伪代码撒
回复 使用道具 举报
  1. package com.itheima;
  2. /**
  3. *
  4. * @author 钱伟
  5. *
  6. */
  7. class Icebox
  8. {
  9.         String door;
  10.         void open()
  11.         {
  12.                 System.out.println("打开"+door);
  13.         }
  14.         void close()
  15.         {
  16.                 System.out.println("关闭"+door);
  17.         }

  18. }
  19. class Elephant
  20. {
  21.        
  22.         void putElephant()
  23.         {
  24.                 System.out.println("把大象放进去");
  25.         }
  26. }
  27. class Text
  28. {

  29.         public static void main(String args[])
  30.         {
  31.                 Icebox i = new Icebox();
  32.                 i.door = "冰箱门";
  33.                 i.open();
  34.                 new Elephant().putElephant();
  35.                 i.close();
  36.         }

  37. }
复制代码


回复 使用道具 举报
后面标题看不清,不知是不是你要的,应该能看懂就没加注释了!
回复 使用道具 举报
。。。真搞装大象啊,我就在毕老师视频里看到过
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马