摘要: 在一个程序中,如果有一个或多个耗时很长的计算,在单线程程序中,每个计算要依次完成,一个计算要在完全结束后,其他计算才能进行,如下程序:class dog{ public void run() { while(true) { System.out.println("a dog is running!"); } }}class cat{ public void run() { while(true) { System.out.println("a cat is running!"); } }}class mouse{ public void run() { 阅读全文
posted @ 2012-02-21 15:59 Alen_Xu 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 这个类根据课堂的练习所做的,目的在于通过认识数据类型public class ExerciseQuestion { /** * @param args */ static int b1 = 0; static long b2 = 1000; static float b3 = 3.4f;//*如果不加f会出错。 static double b4 = 34.45; static char b5 = '4'; static boolean b6 = true; public static void main(String[] args) { // TODO Auto-generat 阅读全文
posted @ 2012-02-21 14:04 Alen_Xu 阅读(354) 评论(0) 推荐(0) 编辑