首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 没有什么

没有什么

  • 资源大小:12.46 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: assosciate

资 源 简 介

`Imagine a team class, as shown / @version 1.0 **/ public class Team { private String name; private int teamId; public Team() { teamId=0; name=""; } public void setName(String name) { this.name=name; } public void setTeamId(int n) { this.teamId=n; } public int getTeamId() { return teamId; } public String getName() { return name; } }** Also, a class Player exists independently (as of the following code:) public class Player { private String fields; private int id; public Player() { fields="dirt track"; id=0; } public void setFields(String fields) { this.fields=fields; } public void setId(int n) { this.id=n; } public int getId() { return id; } public String getFields() { return fields; } } Now, to speak about dependency, let us have a method in Team class as, public void printDefaultPlayerDetails() { Player p=new Player(); System.out.println(p.getId()); System.out.println(p.getFields()); } As we can see, the class Team cannot

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.244069s