摘要: public class test30 { public static void main(String[] args){ Thread xc11=new Thread(new Xc41()); Thread xc12=new Thread(new Xc42()); xc11.setPriority 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(25) 评论(0) 推荐(0)
摘要: //创建线程 class Xc3 extends Thread { public void run(){ System.out.println("当前线程的名称为"+Thread.currentThread().getName()); } } public class test29{ public 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(39) 评论(0) 推荐(0)
摘要: //创建线程的第二种方法 class Xc2 implements Runnable { public void run(){ for (int i=0;i<20;i++){ System.out.println("我是歌谣"); } } } public class test28{ public 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(16) 评论(0) 推荐(0)
摘要: //线程的创建方法1 class Xc extends Thread { public void run(){ for (int i=0;i<20;i++){ System.out.println("我是歌谣"); } } } public class test27{ public static v 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(19) 评论(0) 推荐(0)
摘要: //System类 import java.util.Date; import java.util.Properties; public class test26 { public static void main(String[] args){ testOut(-1); //获取系统时间 long 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(51) 评论(0) 推荐(0)
摘要: //Character方法大小写转换 public class test25 { public static void main(String[] args) { char ch = 'A'; //使用构造方法 Character obj1 = new Character('中'); //使用静态方 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(151) 评论(0) 推荐(0)
摘要: //Character方法数量统计 public class test24 { public static void main(String[] args) { char ch = 'A'; //使用构造方法 Character obj1 = new Character('中'); //使用静态方法 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(66) 评论(0) 推荐(0)
摘要: public class test22 { public static void main(String[] args){ int num=5; Integer obj1=new Integer(num); System.out.println("obj1的值为"+obj1); Integer ob 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: public class test22 { public static void main(String[] args){ int num=5; Integer obj1=new Integer(num); System.out.println("obj1的值为"+obj1); Integer ob 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(37) 评论(0) 推荐(0)
摘要: 测试类 public class test22 { public static void main(String[] args){ int num=5; Integer obj1=new Integer(num); System.out.println("obj1的值为"+obj1); Intege 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(37) 评论(0) 推荐(0)