Topic: 太高兴了 跟大家分享helloword感谢why大侠:) |
Print this page |
1.太高兴了 跟大家分享helloword感谢why大侠:) | Copy to clipboard |
Posted by: kittyyyl Posted on: 2004-09-05 22:56 vehicle.java public class vehicle{ public float journey; public int wheelNum; public int loadNum; public int driveSpeed; public vehicle(){ journey=100.3f; wheelNum=4; loadNum=1; } public void driveAt(int speed){ if(speed>=60){ System.out.println("速度太快,容易车祸"); driveSpeed=40; } else{ System.out.println("你在安全行车"); driveSpeed=speed; } } } vehicleDriver.java public class vehicleDriver{ public String name; public vehicleDriver(){ name="TOM"; } public void work(){ vehicle v=new vehicle(); v.driveAt(80); } public static void main(String arg[]){ vehicleDriver vd=new vehicleDriver(); vd.work(); } } |
2.Re:太高兴了 跟大家分享helloword感谢why大侠:) [Re: kittyyyl] | Copy to clipboard |
Posted by: why Posted on: 2004-09-05 23:01 不用谢了。 一般写 Hello World 而不是 Word 的。 高兴归高兴,这话题若无讨论价值,将会移到“灌水乐园”版块。 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |