Example4_9

Contributor:游客136522539 Type:代码 Date time:2021-04-08 21:45:31 Favorite:1 Score:0
返回上页 Report
请选择举报理由:




Collection Modify the typo
package Example4_9;
public class SIM {
long number;
SIM(long number){
this.number = number;
}
long getNumber(){
return number;
}
}
package Example4_9;
public class MobileTelephone {
SIM sim;
void setSIM(SIM card){
sim = card;
}
long lookNumber(){
return sim.getNumber();
}
}
package Example4_9;
public class Example4_9 {
public static void main(String[] args) {
// TODO Auto-generated method stub
SIM simOne = new SIM(13889776509L);
MobileTelephone mobile = new MobileTelephone();
mobile.setSIM(simOne);
System.out.println("手机号码:"+mobile.lookNumber());
SIM simTwo = new SIM(15967563567L);
mobile.setSIM(simTwo);
System.out.println("手机号码:"+mobile.lookNumber());
}
}
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
Hot degree:
Difficulty:
quality:
Description: the system according to the heat, the difficulty, the quality of automatic certification, the certification of the article will be involved in typing!

This paper typing ranking TOP20

  • No data!

用户更多文章推荐