五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

時鐘

2023-03-08 19:38 作者:終極向晚葵  | 我要投稿

package clock;




public class Clock {

private Display hour =new Display(24);

private Display mintue =new Display(60);

public void start() {

for(;;) {

mintue.increase();

if(mintue.getvalue()==0) {

hour.increase();

}

//printf表示帶格式的輸出,“%02d”表示輸出一個整數(shù),且一定占據(jù)兩個字符

System.out.printf("%02d:%02d\n", hour.getvalue(),mintue.getvalue());

}}

public static void main(String[] args) {

// TODO Auto-generated method stub

Clock clock = new Clock();

clock.start();

}


}

package clock;



public class Display {

private int value =0;

private int limit=0;

public Display(int limit) {

this.limit=limit;

}

public void increase() {

value++;

if( value== limit) {

value = 0;

}

}

//可以得知現(xiàn)在的value的值

public int getvalue() {

return value;

}

public static void main(String[] args) {

// TODO Auto-generated method stub

Display d = new Display(24);

for (;;) {

d.increase();

System.out.println(d.getvalue());

}

}


}


時鐘的評論 (共 條)

分享到微博請遵守國家法律
武陟县| 隆德县| 喀什市| 莱阳市| 手游| 蚌埠市| 太和县| 合肥市| 华安县| 龙泉市| 乌审旗| 哈巴河县| 温泉县| 永仁县| 呼伦贝尔市| 绥江县| 汝城县| 固镇县| 博罗县| 余姚市| 维西| 广汉市| 上杭县| 黄大仙区| 惠东县| 靖远县| 石林| 奉化市| 双柏县| 鸡西市| 札达县| 阳信县| 吉木乃县| 杭锦旗| 辽阳县| 色达县| 巴彦县| 桑植县| 柞水县| 康平县| 滨州市|