2017年9月14日
摘要: 1.多线程: /** * 01.继承Thread类 */ public class MyThreadDemo extends Thread { /** * 重写父类的run() */ @Override public void run() { for (int i = 1; i <= 100; i+ 阅读全文
posted @ 2017-09-14 17:15 我可不是隔壁的老王 阅读(169) 评论(0) 推荐(0) 编辑
  2017年9月12日
摘要: 1.理论: import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; /** * 字节 输入流 从电脑中的 阅读全文
posted @ 2017-09-12 17:25 我可不是隔壁的老王 阅读(108) 评论(0) 推荐(0) 编辑
  2017年9月11日
摘要: 1.File import java.io.File; import java.io.IOException; public class FileTest { public static void main(String[] args) throws IOException { // 创建一个文件 阅读全文
posted @ 2017-09-11 17:15 我可不是隔壁的老王 阅读(321) 评论(0) 推荐(0) 编辑
摘要: public class ArrayTest { public static void main(String[] args) { /* * String[] nums = {}; buySomething(nums); */ String[] nums = { "啤酒", "饮料", "矿泉水" }; ... 阅读全文
posted @ 2017-09-11 17:10 我可不是隔壁的老王 阅读(353) 评论(0) 推荐(0) 编辑
摘要: import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import org.junit.Test; public class DateTest { @Test public void test0... 阅读全文
posted @ 2017-09-11 17:09 我可不是隔壁的老王 阅读(126) 评论(0) 推荐(0) 编辑
  2017年9月8日
摘要: 1. import org.junit.Test; public class StringDemo { @Test public void test01() { String a = "abc"; String b = "ABC"; System.out.println("字符串的长度:" + a. 阅读全文
posted @ 2017-09-08 11:30 我可不是隔壁的老王 阅读(159) 评论(0) 推荐(0) 编辑
  2017年9月7日
摘要: /** * 学生的实体类 */ public class Student { private String name; private Gender sex; // 枚举类型的性别 public String getName() { return name; } public void setNam 阅读全文
posted @ 2017-09-07 16:39 我可不是隔壁的老王 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 1.二进制: 阅读全文
posted @ 2017-09-07 16:33 我可不是隔壁的老王 阅读(480) 评论(0) 推荐(0) 编辑
摘要: public class ArrayTest { public static void main(String[] args) { int nums[] = new int[5]; nums[0] = 1; nums[1] = 1; nums[2] = 1; nums[3] = 1; nums[4] 阅读全文
posted @ 2017-09-07 16:31 我可不是隔壁的老王 阅读(160) 评论(0) 推荐(0) 编辑
  2017年8月30日
摘要: 1.log4j : log for java 阅读全文
posted @ 2017-08-30 14:07 我可不是隔壁的老王 阅读(123) 评论(0) 推荐(0) 编辑