xerga 1 年之前
父節點
當前提交
227341f901
共有 100 個文件被更改,包括 3371 次插入131 次删除
  1. 2 0
      01_JavaSe/JavaSe/.idea/encodings.xml
  2. 9 0
      01_JavaSe/JavaSe/.idea/libraries/commons_io_2_5.xml
  3. 5 0
      01_JavaSe/JavaSe/.idea/modules.xml
  4. 185 124
      01_JavaSe/JavaSe/.idea/workspace.xml
  5. 4 0
      01_JavaSe/JavaSe/1.txt
  6. 5 5
      01_JavaSe/JavaSe/day17/src/com/lc/day17/exer/Exer2.java
  7. 5 1
      01_JavaSe/JavaSe/day17/upload/name.txt
  8. 1 1
      01_JavaSe/JavaSe/day17/upload/名单.txt
  9. 29 0
      01_JavaSe/JavaSe/day18/.gitignore
  10. 0 0
      01_JavaSe/JavaSe/day18/1.txt
  11. 22 0
      01_JavaSe/JavaSe/day18/day18.iml
  12. 二進制
      01_JavaSe/JavaSe/day18/emp.dat
  13. 0 0
      01_JavaSe/JavaSe/day18/files/1.txt
  14. 21 0
      01_JavaSe/JavaSe/day18/files/dbcp_gbk.txt
  15. 21 0
      01_JavaSe/JavaSe/day18/files/dbcp_utf-8.txt
  16. 二進制
      01_JavaSe/JavaSe/day18/files/emp.dat
  17. 二進制
      01_JavaSe/JavaSe/day18/files/emp1.dat
  18. 二進制
      01_JavaSe/JavaSe/day18/files/emp2.dat
  19. 二進制
      01_JavaSe/JavaSe/day18/files/emp4.dat
  20. 7 0
      01_JavaSe/JavaSe/day18/files/gbk.txt
  21. 3 0
      01_JavaSe/JavaSe/day18/files/io.txt
  22. 3 0
      01_JavaSe/JavaSe/day18/files/log.txt
  23. 二進制
      01_JavaSe/JavaSe/day18/files/person.dat
  24. 二進制
      01_JavaSe/JavaSe/day18/files/save.bin
  25. 二進制
      01_JavaSe/JavaSe/day18/files/text.txt
  26. 1 0
      01_JavaSe/JavaSe/day18/files/u8.txt
  27. 7 0
      01_JavaSe/JavaSe/day18/files/感悟.txt
  28. 二進制
      01_JavaSe/JavaSe/day18/img/a.jpg
  29. 二進制
      01_JavaSe/JavaSe/day18/img/a/a.jpg
  30. 二進制
      01_JavaSe/JavaSe/day18/img/a/c/a.jpg
  31. 1 0
      01_JavaSe/JavaSe/day18/img/abc.txt
  32. 二進制
      01_JavaSe/JavaSe/day18/img/b.jpg
  33. 二進制
      01_JavaSe/JavaSe/day18/img/b/a.jpg
  34. 1 0
      01_JavaSe/JavaSe/day18/img/e.txt
  35. 二進制
      01_JavaSe/JavaSe/day18/imgs/img/a.jpg
  36. 二進制
      01_JavaSe/JavaSe/day18/imgs/img/a/a.jpg
  37. 二進制
      01_JavaSe/JavaSe/day18/imgs/img/a/c/a.jpg
  38. 二進制
      01_JavaSe/JavaSe/day18/imgs/img/b.jpg
  39. 二進制
      01_JavaSe/JavaSe/day18/imgs/img/b/a.jpg
  40. 二進制
      01_JavaSe/JavaSe/day18/libs/commons-io-2.5.jar
  41. 53 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/exer/Goods.java
  42. 73 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/exer/Test01.java
  43. 76 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io1/TestInputStreamReader.java
  44. 54 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io1/TestOutputStreamWriter.java
  45. 72 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/Employee.java
  46. 54 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/TestObj.java
  47. 115 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/TestObject.java
  48. 39 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/Logger.java
  49. 27 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestLogger.java
  50. 82 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestOther.java
  51. 49 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestScanner.java
  52. 57 0
      01_JavaSe/JavaSe/day18/src/com/lc/day18/io4/TestCommon.java
  53. 29 0
      01_JavaSe/JavaSe/day19/.gitignore
  54. 11 0
      01_JavaSe/JavaSe/day19/day19.iml
  55. 47 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/netapi/TestAdderss.java
  56. 45 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp1/Client.java
  57. 50 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp1/Server.java
  58. 49 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp2/Client.java
  59. 78 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp2/Server.java
  60. 99 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp3/Client.java
  61. 90 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp3/Server.java
  62. 82 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp4/Client.java
  63. 75 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp4/Server.java
  64. 33 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/udp1/DatagramSocket1.java
  65. 32 0
      01_JavaSe/JavaSe/day19/src/com/lc/day19/udp1/DatagramSocket2.java
  66. 29 0
      01_JavaSe/JavaSe/day20/.gitignore
  67. 21 0
      01_JavaSe/JavaSe/day20/day20.iml
  68. 50 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect/Person.java
  69. 105 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect/Test01.java
  70. 20 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Check.java
  71. 40 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Person.java
  72. 69 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Test02.java
  73. 34 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect2/LCDemo.java
  74. 55 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect2/TestDemo.java
  75. 37 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect3/Person.java
  76. 48 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect3/TestPerson.java
  77. 85 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/OtherTest.java
  78. 48 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/Person.java
  79. 73 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestFiled.java
  80. 47 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestGeneric.java
  81. 85 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestMethod.java
  82. 43 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/Student.java
  83. 47 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/TestField.java
  84. 49 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/TestMethod.java
  85. 40 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect6/TestUser.java
  86. 23 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect6/User.java
  87. 20 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Column.java
  88. 42 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Student.java
  89. 19 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Table.java
  90. 59 0
      01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/TestAnnotation.java
  91. 2 0
      01_JavaSe/JavaSe/day20/src/jdbc.properties
  92. 2 0
      01_JavaSe/JavaSe/day20/src/user.properties
  93. 29 0
      01_JavaSe/JavaSe/day21/.gitignore
  94. 21 0
      01_JavaSe/JavaSe/day21/day21.iml
  95. 36 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer/Person.java
  96. 64 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer/TestPerson.java
  97. 47 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/Employee.java
  98. 57 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/Test01.java
  99. 46 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/TestLambda.java
  100. 76 0
      01_JavaSe/JavaSe/day21/src/com/lc/day21/exer2/Employee.java

+ 2 - 0
01_JavaSe/JavaSe/.idea/encodings.xml

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
+    <file url="file://$PROJECT_DIR$/day18/files/gbk.txt" charset="GBK" />
+    <file url="file://$PROJECT_DIR$/day18/files/感悟.txt" charset="GBK" />
     <file url="PROJECT" charset="UTF-8" />
   </component>
 </project>

+ 9 - 0
01_JavaSe/JavaSe/.idea/libraries/commons_io_2_5.xml

@@ -0,0 +1,9 @@
+<component name="libraryTable">
+  <library name="commons-io-2.5">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/day18/libs/commons-io-2.5.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>

+ 5 - 0
01_JavaSe/JavaSe/.idea/modules.xml

@@ -20,6 +20,11 @@
       <module fileurl="file://$PROJECT_DIR$/day15/day15.iml" filepath="$PROJECT_DIR$/day15/day15.iml" />
       <module fileurl="file://$PROJECT_DIR$/day16/day16.iml" filepath="$PROJECT_DIR$/day16/day16.iml" />
       <module fileurl="file://$PROJECT_DIR$/day17/day17.iml" filepath="$PROJECT_DIR$/day17/day17.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day18/day18.iml" filepath="$PROJECT_DIR$/day18/day18.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day19/day19.iml" filepath="$PROJECT_DIR$/day19/day19.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day20/day20.iml" filepath="$PROJECT_DIR$/day20/day20.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day21/day21.iml" filepath="$PROJECT_DIR$/day21/day21.iml" />
+      <module fileurl="file://$PROJECT_DIR$/test/test.iml" filepath="$PROJECT_DIR$/test/test.iml" />
     </modules>
   </component>
 </project>

+ 185 - 124
01_JavaSe/JavaSe/.idea/workspace.xml

@@ -5,84 +5,96 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="12140050-64bb-493c-b359-1ac1fbbf3cc2" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/day12/src/com/lc/day12/test/InstantTest.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/comparable/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/comparable/TestStudent.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date03/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date03/Test02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date04/DateTest01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date04/DateTest02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date04/DateTest03.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date04/DateTest04.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/date04/DateTest05.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/exer/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/exer/Test02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/exer/Test03.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/string01/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/stringbuffer02/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/stringbuffer02/Test02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/test/Account.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/test/Husband.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/test/TestAccount.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day13/src/com/lc/day13/test/Wife.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api1/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api1/PersonSort.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api1/TestPerson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api2/TestMath.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api2/TestRuntime.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/api2/TestSystem.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/arraylist3/TestArrayList1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/arraylist3/TestLinkedList.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/collection1/TestCollection.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/collection1/TestCollection1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/exer/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/exer/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/exer/TestList.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day14/src/com/lc/day14/list2/TestList1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/collections/TestCollections.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/Employee.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/ExerSet.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/ExerSet1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/ExerTreeSet.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/MyDate.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/exer/TestHashMap.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/map04/TestLinkedHashMap.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/map04/TestMap.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/map04/TestProperties.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/map04/TestTreeMap.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set01/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set01/TestHashSet.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set02/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set02/TestLinkedHashSet.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set03/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/com/lc/day15/set03/TestTreeSet.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day15/src/jdbc.properties" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/exer/generic/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/exer/generic/TestStudent.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic1/TestGeneric.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic1/bean/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic2/A.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic2/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic2/TestPerson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic3/TestMethod.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic4/PersonTest.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic4/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic4/Test02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/generic4/Test03.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/srcs/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day16/src/com/lc/day16/srcs/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/imgs/1.jpg" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/exer/Exer1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/exer/Exer2.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/file1/TestFile.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io1/TestReader.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io1/TestWriter.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io2/TestFileInputStream.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io2/TestFileOutputStream.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io3/TestBufferedByte.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/io3/TestBufferedChar.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/upload/a.txt" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day17/upload/name.txt" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/files/dbcp_gbk.txt" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/files/dbcp_utf-8.txt" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/files/感悟.txt" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/img/a.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/img/a/a.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/img/a/c/a.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/img/b/a.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/libs/commons-io-2.5.jar" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/exer/Goods.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/exer/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io1/TestInputStreamReader.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io1/TestOutputStreamWriter.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io2/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io2/TestObj.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io2/TestObject.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io3/Logger.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io3/TestLogger.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io3/TestOther.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io3/TestScanner.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day18/src/com/lc/day18/io4/TestCommon.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/netapi/TestAdderss.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp1/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp1/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp2/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp2/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp3/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp3/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp4/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/tcp4/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/udp1/DatagramSocket1.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day19/src/com/lc/day19/udp1/DatagramSocket2.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect1/Check.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect1/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect1/Test02.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect2/LCDemo.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect2/TestDemo.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect3/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect3/TestPerson.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect4/OtherTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect4/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect4/TestFiled.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect4/TestGeneric.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect4/TestMethod.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect5/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect5/TestField.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect5/TestMethod.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect6/TestUser.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect6/User.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect7/Column.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect7/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect7/Table.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/com/lc/day20/reflect7/TestAnnotation.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/jdbc.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day20/src/user.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer/TestPerson.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer1/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer1/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer1/TestLambda.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer2/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer2/EmployeeService.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/exer2/TestLambda.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/fun2/NumberComputer.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/fun2/TestFunctionInterface.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/fun3/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/lambda1/TestJava8Lambda.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/method4/ConstructorRefTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/method4/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/method4/MethodRefTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/method4/TestArr.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/other6/Point.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/other6/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/stream5/StreamEndding.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/stream5/StreamMiddleOperate.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day21/src/com/lc/day21/stream5/TestCollection.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a1/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a1/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a2/Client.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a2/Server.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a3/TestChatClient.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a3/TestChatServer.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a4/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a4/Test01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/test/src/com/lc/internet/a4/TestField.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/day17/src/com/lc/day17/exer/Exer2.java" beforeDir="false" afterPath="$PROJECT_DIR$/day17/src/com/lc/day17/exer/Exer2.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/day17/upload/name.txt" beforeDir="false" afterPath="$PROJECT_DIR$/day17/upload/name.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/day17/upload/名单.txt" beforeDir="false" afterPath="$PROJECT_DIR$/day17/upload/名单.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/out/production/day17/com/lc/day17/exer/Exer2.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/day17/com/lc/day17/exer/Exer2.class" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -96,10 +108,11 @@
   <component name="FileTemplateManagerImpl">
     <option name="RECENT_TEMPLATES">
       <list>
-        <option value="Interface" />
         <option value="Enum" />
         <option value="AnnotationType" />
+        <option value="Interface" />
         <option value="Class" />
+        <option value="Record" />
       </list>
     </option>
   </component>
@@ -136,7 +149,7 @@
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "WebServerToolWindowFactoryState": "false",
     "jdk.selected.JAVA_MODULE": "17",
-    "last_opened_file_path": "C:/LoveCoding/VIP-27/code/01_JavaSe/JavaSe/day17/imgs",
+    "last_opened_file_path": "C:/LoveCoding/VIP-27/code/02_JavaWeb",
     "node.js.detected.package.eslint": "true",
     "node.js.detected.package.tslint": "true",
     "node.js.selected.package.eslint": "(autodetect)",
@@ -151,93 +164,98 @@
 }]]></component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
-      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day17\imgs" />
-      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day10\src\com\lc\day10\thowable1" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day20\src\com\lc\day20\reflect1" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day19\src\com\lc\day19\tcp4" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day18\img\a" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day18\img" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day18\libs" />
+    </key>
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day20\src" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day20\src\com\lc\day20" />
+      <recent name="C:\LoveCoding\VIP-27\code\01_JavaSe\JavaSe\day18\files" />
     </key>
     <key name="CopyClassDialog.RECENTS_KEY">
-      <recent name="com.lc.day17.exer" />
-      <recent name="com.lc.day17.io3" />
-      <recent name="com.lc.day17.io2" />
-      <recent name="com.lc.day15.exer" />
-      <recent name="com.lc.day15.set03" />
+      <recent name="com.lc.day20.reflect6" />
+      <recent name="com.lc.day20.reflect4" />
+      <recent name="com.lc.day19.tcp2" />
+      <recent name="com.lc.internet.a1.a2" />
+      <recent name="com.lc.day18.io3" />
     </key>
   </component>
-  <component name="RunManager" selected="JUnit.Exer2.test01">
-    <configuration name="Exer2.test01" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="day17" />
+  <component name="RunManager" selected="JUnit.Test01.test07">
+    <configuration name="TestPerson" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+      <option name="MAIN_CLASS_NAME" value="com.lc.day21.exer.TestPerson" />
+      <module name="day21" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day17.exer.*" />
+          <option name="PATTERN" value="com.lc.day21.exer.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.lc.day17.exer" />
-      <option name="MAIN_CLASS_NAME" value="com.lc.day17.exer.Exer2" />
-      <option name="METHOD_NAME" value="test01" />
-      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="TestBufferedByte.test01" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="day17" />
+    <configuration name="StreamEndding.test05" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day21" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day17.io3.*" />
+          <option name="PATTERN" value="com.lc.day21.stream5.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.lc.day17.io3" />
-      <option name="MAIN_CLASS_NAME" value="com.lc.day17.io3.TestBufferedByte" />
-      <option name="METHOD_NAME" value="test01" />
+      <option name="PACKAGE_NAME" value="com.lc.day21.stream5" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day21.stream5.StreamEndding" />
+      <option name="METHOD_NAME" value="test05" />
       <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="TestBufferedByte.test03" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="day17" />
+    <configuration name="StreamEndding.test06" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day21" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day17.io3.*" />
+          <option name="PATTERN" value="com.lc.day21.stream5.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.lc.day17.io3" />
-      <option name="MAIN_CLASS_NAME" value="com.lc.day17.io3.TestBufferedByte" />
-      <option name="METHOD_NAME" value="test03" />
+      <option name="PACKAGE_NAME" value="com.lc.day21.stream5" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day21.stream5.StreamEndding" />
+      <option name="METHOD_NAME" value="test06" />
       <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="TestBufferedChar.test01" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="day17" />
+    <configuration name="Test01.test06" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day21" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day17.io3.*" />
+          <option name="PATTERN" value="com.lc.day21.other6.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.lc.day17.io3" />
-      <option name="MAIN_CLASS_NAME" value="com.lc.day17.io3.TestBufferedChar" />
-      <option name="METHOD_NAME" value="test01" />
+      <option name="PACKAGE_NAME" value="com.lc.day21.other6" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day21.other6.Test01" />
+      <option name="METHOD_NAME" value="test06" />
       <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="TestBufferedChar.test02" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="day17" />
+    <configuration name="Test01.test07" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day21" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day17.io3.*" />
+          <option name="PATTERN" value="com.lc.day21.other6.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.lc.day17.io3" />
-      <option name="MAIN_CLASS_NAME" value="com.lc.day17.io3.TestBufferedChar" />
-      <option name="METHOD_NAME" value="test02" />
+      <option name="PACKAGE_NAME" value="com.lc.day21.other6" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day21.other6.Test01" />
+      <option name="METHOD_NAME" value="test07" />
       <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
@@ -245,11 +263,11 @@
     </configuration>
     <recent_temporary>
       <list>
-        <item itemvalue="JUnit.Exer2.test01" />
-        <item itemvalue="JUnit.TestBufferedChar.test02" />
-        <item itemvalue="JUnit.TestBufferedChar.test01" />
-        <item itemvalue="JUnit.TestBufferedByte.test03" />
-        <item itemvalue="JUnit.TestBufferedByte.test01" />
+        <item itemvalue="JUnit.Test01.test07" />
+        <item itemvalue="JUnit.Test01.test06" />
+        <item itemvalue="Application.TestPerson" />
+        <item itemvalue="JUnit.StreamEndding.test06" />
+        <item itemvalue="JUnit.StreamEndding.test05" />
       </list>
     </recent_temporary>
   </component>
@@ -293,6 +311,14 @@
       <workItem from="1690939282458" duration="15341000" />
       <workItem from="1691023555033" duration="16077000" />
       <workItem from="1691198578351" duration="14660000" />
+      <workItem from="1691238697829" duration="104000" />
+      <workItem from="1691284527744" duration="15953000" />
+      <workItem from="1691378808845" duration="641000" />
+      <workItem from="1691448600851" duration="17831000" />
+      <workItem from="1691496500463" duration="2341000" />
+      <workItem from="1691538656273" duration="13926000" />
+      <workItem from="1691628937313" duration="15412000" />
+      <workItem from="1691755044626" duration="151000" />
     </task>
     <servers />
   </component>
@@ -437,6 +463,41 @@
           <line>27</line>
           <option name="timeStamp" value="130" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day18/src/com/lc/day18/io2/TestObj.java</url>
+          <line>22</line>
+          <option name="timeStamp" value="141" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/test/src/com/lc/internet/a2/Client.java</url>
+          <line>38</line>
+          <option name="timeStamp" value="142" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day19/src/com/lc/day19/tcp3/Client.java</url>
+          <line>85</line>
+          <option name="timeStamp" value="147" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day19/src/com/lc/day19/tcp4/Server.java</url>
+          <line>67</line>
+          <option name="timeStamp" value="151" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day19/src/com/lc/day19/tcp4/Client.java</url>
+          <line>72</line>
+          <option name="timeStamp" value="152" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day20/src/com/lc/day20/reflect7/TestAnnotation.java</url>
+          <line>32</line>
+          <option name="timeStamp" value="153" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day21/src/com/lc/day21/stream5/StreamEndding.java</url>
+          <line>33</line>
+          <option name="timeStamp" value="156" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
   </component>

+ 4 - 0
01_JavaSe/JavaSe/1.txt

@@ -0,0 +1,4 @@
+aaa
+bbb
+ccc
+stop

+ 5 - 5
01_JavaSe/JavaSe/day17/src/com/lc/day17/exer/Exer2.java

@@ -33,14 +33,14 @@ public class Exer2 {
         while ( (s =br.readLine()) != null ){
             //获取 s的第一个字符
             char name = s.charAt(0);
-
-            if (map.containsKey(name)){
-                Integer integer = map.get(name);
+            String s1 = String.valueOf(name);
+            if (map.containsKey(s1)){
+                Integer integer = map.get(s1);
                 integer++;
                 //key Steing  value Integer
-                map.put(String.valueOf(name),integer);
+                map.put(s1,integer);
             }else{
-                map.put(String.valueOf(name),1);
+                map.put(s1,1);
             }
         }
 

+ 5 - 1
01_JavaSe/JavaSe/day17/upload/name.txt

@@ -1,3 +1,7 @@
 张 三
 李 四
-王 小五
+王 小五
+张 三
+张 三
+张 三
+张 三

+ 1 - 1
01_JavaSe/JavaSe/day17/upload/名单.txt

@@ -1,3 +1,3 @@
-张:1
+张:5
 王:1
 李:1

+ 29 - 0
01_JavaSe/JavaSe/day18/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 0 - 0
01_JavaSe/JavaSe/day18/1.txt


+ 22 - 0
01_JavaSe/JavaSe/day18/day18.iml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library name="JUnit4">
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
+          <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="commons-io-2.5" level="project" />
+  </component>
+</module>

二進制
01_JavaSe/JavaSe/day18/emp.dat


+ 0 - 0
01_JavaSe/JavaSe/day18/files/1.txt


+ 21 - 0
01_JavaSe/JavaSe/day18/files/dbcp_gbk.txt

@@ -0,0 +1,21 @@
+dbcp连接池常用基本配置属性
+
+1.initialSize :连接池启动时创建的初始化连接数量(默认值为0)
+
+2.maxActive :连接池中可同时连接的最大的连接数(默认值为8,调整为20,高峰单机器在20并发左右,自己根据应用场景定)
+
+3.maxIdle:连接池中最大的空闲的连接数,超过的空闲连接将被释放,如果设置为负数表示不限制(默认为8个,maxIdle不能设置太小,因为假如在高负载的情况下,连接的打开时间比关闭的时间快,会引起连接池中idle的个数 上升超过maxIdle,而造成频繁的连接销毁和创建,类似于jvm参数中的Xmx设置)
+
+4.minIdle:连接池中最小的空闲的连接数,低于这个数量会被创建新的连接(默认为0,调整为5,该参数越接近maxIdle,性能越好,因为连接的创建和销毁,都是需要消耗资源的;但是不能太大,因为在机器很空闲的时候,也会创建低于minidle个数的连接,类似于jvm参数中的Xmn设置)
+
+5.maxWait  :最大等待时间,当没有可用连接时,连接池等待连接释放的最大时间,超过该时间限制会抛出异常,如果设置-1表示无限等待(默认为无限,调整为60000ms,避免因线程池不够用,而导致请求被无限制挂起)
+
+6.poolPreparedStatements:开启池的prepared(默认是false,未调整,经过测试,开启后的性能没有关闭的好。)
+
+7.maxOpenPreparedStatements:开启池的prepared 后的同时最大连接数(默认无限制,同上,未配置)
+
+8.minEvictableIdleTimeMillis  :连接池中连接,在时间段内一直空闲, 被逐出连接池的时间
+
+9.removeAbandonedTimeout  :超过时间限制,回收没有用(废弃)的连接(默认为 300秒,调整为180)
+
+10.removeAbandoned  :超过removeAbandonedTimeout时间后,是否进 行没用连接(废弃)的回收(默认为false,调整为true)

+ 21 - 0
01_JavaSe/JavaSe/day18/files/dbcp_utf-8.txt

@@ -0,0 +1,21 @@
+dbcp连接池常用基本配置属性
+
+1.initialSize :连接池启动时创建的初始化连接数量(默认值为0)
+
+2.maxActive :连接池中可同时连接的最大的连接数(默认值为8,调整为20,高峰单机器在20并发左右,自己根据应用场景定)
+
+3.maxIdle:连接池中最大的空闲的连接数,超过的空闲连接将被释放,如果设置为负数表示不限制(默认为8个,maxIdle不能设置太小,因为假如在高负载的情况下,连接的打开时间比关闭的时间快,会引起连接池中idle的个数 上升超过maxIdle,而造成频繁的连接销毁和创建,类似于jvm参数中的Xmx设置)
+
+4.minIdle:连接池中最小的空闲的连接数,低于这个数量会被创建新的连接(默认为0,调整为5,该参数越接近maxIdle,性能越好,因为连接的创建和销毁,都是需要消耗资源的;但是不能太大,因为在机器很空闲的时候,也会创建低于minidle个数的连接,类似于jvm参数中的Xmn设置)
+
+5.maxWait  :最大等待时间,当没有可用连接时,连接池等待连接释放的最大时间,超过该时间限制会抛出异常,如果设置-1表示无限等待(默认为无限,调整为60000ms,避免因线程池不够用,而导致请求被无限制挂起)
+
+6.poolPreparedStatements:开启池的prepared(默认是false,未调整,经过测试,开启后的性能没有关闭的好。)
+
+7.maxOpenPreparedStatements:开启池的prepared 后的同时最大连接数(默认无限制,同上,未配置)
+
+8.minEvictableIdleTimeMillis  :连接池中连接,在时间段内一直空闲, 被逐出连接池的时间
+
+9.removeAbandonedTimeout  :超过时间限制,回收没有用(废弃)的连接(默认为 300秒,调整为180)
+
+10.removeAbandoned  :超过removeAbandonedTimeout时间后,是否进 行没用连接(废弃)的回收(默认为false,调整为true)

二進制
01_JavaSe/JavaSe/day18/files/emp.dat


二進制
01_JavaSe/JavaSe/day18/files/emp1.dat


二進制
01_JavaSe/JavaSe/day18/files/emp2.dat


二進制
01_JavaSe/JavaSe/day18/files/emp4.dat


+ 7 - 0
01_JavaSe/JavaSe/day18/files/gbk.txt

@@ -0,0 +1,7 @@
+六项精进:
+(一)付出不亚于任何人的努力
+(二)要谦虚,不要骄傲
+(三)要每天反省
+(四)活着,就要感谢
+(五)积善行、思利他
+(六)不要有感性的烦恼

+ 3 - 0
01_JavaSe/JavaSe/day18/files/io.txt

@@ -0,0 +1,3 @@
+hello
+1
+1.5

+ 3 - 0
01_JavaSe/JavaSe/day18/files/log.txt

@@ -0,0 +1,3 @@
+2023-08-06 14:40:23 122: 调用了System类的gc()方法,建议启动垃圾回收
+2023-08-06 14:40:23 156: 调用了TeamView的addMember()方法
+2023-08-06 14:40:23 156: 用户尝试进行登录,验证失败

二進制
01_JavaSe/JavaSe/day18/files/person.dat


二進制
01_JavaSe/JavaSe/day18/files/save.bin


二進制
01_JavaSe/JavaSe/day18/files/text.txt


+ 1 - 0
01_JavaSe/JavaSe/day18/files/u8.txt

@@ -0,0 +1 @@
+你好中国你好北京

+ 7 - 0
01_JavaSe/JavaSe/day18/files/感悟.txt

@@ -0,0 +1,7 @@
+六项精进:
+(一)付出不亚于任何人的努力
+(二)要谦虚,不要骄傲
+(三)要每天反省
+(四)活着,就要感谢
+(五)积善行、思利他
+(六)不要有感性的烦恼

二進制
01_JavaSe/JavaSe/day18/img/a.jpg


二進制
01_JavaSe/JavaSe/day18/img/a/a.jpg


二進制
01_JavaSe/JavaSe/day18/img/a/c/a.jpg


+ 1 - 0
01_JavaSe/JavaSe/day18/img/abc.txt

@@ -0,0 +1 @@
+hahahahaha

二進制
01_JavaSe/JavaSe/day18/img/b.jpg


二進制
01_JavaSe/JavaSe/day18/img/b/a.jpg


+ 1 - 0
01_JavaSe/JavaSe/day18/img/e.txt

@@ -0,0 +1 @@
+hahahahaha

二進制
01_JavaSe/JavaSe/day18/imgs/img/a.jpg


二進制
01_JavaSe/JavaSe/day18/imgs/img/a/a.jpg


二進制
01_JavaSe/JavaSe/day18/imgs/img/a/c/a.jpg


二進制
01_JavaSe/JavaSe/day18/imgs/img/b.jpg


二進制
01_JavaSe/JavaSe/day18/imgs/img/b/a.jpg


二進制
01_JavaSe/JavaSe/day18/libs/commons-io-2.5.jar


+ 53 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/exer/Goods.java

@@ -0,0 +1,53 @@
+package com.lc.day18.exer;
+
+import java.io.Serializable;
+
+/**
+ * ClassName: Goods
+ * Package: com.lc.day18.exer
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 11:30
+ * @Version 1.0
+ */
+public class Goods implements Serializable {
+
+    final static long serialVersionUID = 23234234234L;
+
+    private String name;
+
+    private Double price;
+
+    private Integer number;
+
+    public Goods(String name, Double price, Integer number) {
+        this.name = name;
+        this.price = price;
+        this.number = number;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+}

+ 73 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/exer/Test01.java

@@ -0,0 +1,73 @@
+package com.lc.day18.exer;
+
+import com.lc.day18.io2.Employee;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Scanner;
+
+/**
+ * ClassName: Test01
+ * Package: com.lc.day18.exer
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 11:31
+ * @Version 1.0
+ */
+public class Test01 {
+
+
+    public static void main(String[] args)throws Exception {
+        //File
+        File file = new File("C:\\LoveCoding\\VIP-27\\code\\01_JavaSe\\JavaSe\\day18\\files\\save.bin");
+        if (file.exists()){
+            load(file);
+        }else{
+            save(file);
+        }
+    }
+
+    //存储
+    public static void save(File file) throws Exception{
+        Scanner scanner = new Scanner(System.in);
+
+        boolean flag = true;
+        while (flag){
+            System.out.println("请输入产品名称");
+            String name = scanner.next();
+            System.out.println("请输入产品单价");
+            String price = scanner.next();
+            double p1 = Double.parseDouble(price);
+            System.out.println("请输入产品数量");
+            Integer number = scanner.nextInt();
+
+            System.out.println("是否继续y/n");
+            String stop = scanner.next();
+            if (stop.equals("n")){
+                flag = false;
+            }
+            //创建
+            Goods g2 = new Goods(name, p1, number);
+            //输出
+            ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file));
+            oos.writeObject(g2);
+            oos.close();
+
+        }
+    }
+
+
+    public static void load(File file) throws Exception{
+        //输入流
+        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));
+
+        Goods g1 = (Goods) ois.readObject();
+        Goods g2 = (Goods) ois.readObject();
+
+        System.out.println("金额:"+(g1.getPrice()*g1.getNumber()));
+
+        ois.close();
+    }
+
+}

+ 76 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io1/TestInputStreamReader.java

@@ -0,0 +1,76 @@
+package com.lc.day18.io1;
+
+import org.junit.Test;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.InputStreamReader;
+
+/**
+ * ClassName: TestInputStreamReader
+ * Package: com.lc.day18.io1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 9:30
+ * @Version 1.0
+ */
+public class TestInputStreamReader {
+    @Test
+    public void test01() throws Exception{
+
+        BufferedReader br = new BufferedReader(new FileReader("C:\\Users\\erga\\Desktop\\cc\\dbcp_gbk.txt"));
+
+        String s = br.readLine();
+        System.out.println(s);
+
+    }
+
+
+    @Test
+    public void test02()throws Exception{
+        //使用
+        InputStreamReader isr = new InputStreamReader(new FileInputStream("files\\dbcp_gbk.txt"));
+
+        char[] chars = new char[1024];
+        //读取
+        int read = isr.read(chars);
+        //转字符串
+        String s = new String(chars, 0, read);
+
+        System.out.println(s);
+    }
+
+    @Test
+    public void test03()throws Exception{
+        //使用
+        InputStreamReader isr = new InputStreamReader(
+                new FileInputStream("files\\dbcp_gbk.txt"),"GBK");
+
+        char[] chars = new char[1024];
+        //读取
+        int read = isr.read(chars);
+        //转字符串
+        String s = new String(chars, 0, read);
+
+        System.out.println(s);
+    }
+
+    //循环读取
+    @Test
+    public void test04()throws Exception{
+        //使用
+        InputStreamReader isr = new InputStreamReader(
+                new FileInputStream("files\\dbcp_gbk.txt"),"GBK");
+
+        char[] chars = new char[1024];
+        int len;
+        while (  (len = isr.read(chars)) != -1  ){
+            System.out.println(new String(chars,0,len));
+        }
+
+        isr.close();
+    }
+
+}

+ 54 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io1/TestOutputStreamWriter.java

@@ -0,0 +1,54 @@
+package com.lc.day18.io1;
+
+import org.junit.Test;
+
+import java.io.*;
+
+/**
+ * ClassName: TestInputStreamReader
+ * Package: com.lc.day18.io1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 9:30
+ * @Version 1.0
+ */
+public class TestOutputStreamWriter {
+
+    @Test
+    public void test02() throws Exception{
+        //转换流一起使用
+        //使用
+        InputStreamReader isr = new InputStreamReader(
+                new FileInputStream("files\\u8.txt"),"UTF-8");
+        BufferedReader br = new BufferedReader(isr);
+        //输出流
+        OutputStreamWriter osw = new OutputStreamWriter(
+                new FileOutputStream("files\\gbk.txt"),"GBK");
+        String str = null;
+
+        while (  (str = br.readLine())  != null  ){
+            osw.write(str);
+        }
+        osw.close();
+        br.close();
+    }
+
+    @Test
+    public void test01() throws Exception{
+        //字符到字节
+        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("files\\u8.txt"));
+
+        osw.write("你好中国");
+        osw.write("你好北京");
+
+
+        osw.close();
+
+
+    }
+
+
+
+
+}

+ 72 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/Employee.java

@@ -0,0 +1,72 @@
+package com.lc.day18.io2;
+
+/**
+ * ClassName: Employee
+ * Package: com.lc.day18.io2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 10:52
+ * @Version 1.0
+ */
+
+import java.io.Serializable;
+
+public class Employee implements Serializable {
+
+
+    //final static long serialVersionUID = 23234234234L;
+
+    public static String company; //static修饰的类变量,不会被序列化
+    public String name;
+    public String address;
+    public transient int age; // transient瞬态修饰成员,不会被序列化
+
+    public Employee(String name, String address, int age) {
+        this.name = name;
+        this.address = address;
+        this.age = age;
+    }
+
+    public static String getCompany() {
+        return company;
+    }
+
+    public static void setCompany(String company) {
+        Employee.company = company;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    @Override
+    public String toString() {
+        return "Employee{" +
+                "name='" + name + '\'' +
+                ", address='" + address + '\'' +
+                ", age=" + age +
+                ", company=" + company +
+                '}';
+    }
+}

+ 54 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/TestObj.java

@@ -0,0 +1,54 @@
+package com.lc.day18.io2;
+
+import org.junit.Test;
+
+import java.io.*;
+
+/**
+ * ClassName: TestObj
+ * Package: com.lc.day18.io2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 11:55
+ * @Version 1.0
+ */
+public class TestObj {
+
+    @Test
+    public void test02() throws IOException, ClassNotFoundException {
+        //输出
+        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("files\\emp2.dat"));
+        //输入
+        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("files\\emp2.dat"));
+
+        oos.writeInt(1);
+        oos.flush();
+
+        ois.readInt();
+
+        ois.close();
+        oos.close();
+
+    }
+
+    @Test
+    public void test01() throws IOException, ClassNotFoundException {
+        //输出流
+        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("files\\emp4.dat"));
+        //输入
+        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("files\\emp4.dat"));
+        //对象
+        Employee emp1 = new Employee("tom","北京",22);
+        //写出
+        oos.writeObject(emp1);
+        //读取
+        Employee o = (Employee) ois.readObject();
+        //输出
+        System.out.println(o);
+
+        oos.close();
+        ois.close();
+
+    }
+}

+ 115 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io2/TestObject.java

@@ -0,0 +1,115 @@
+package com.lc.day18.io2;
+
+import org.junit.Test;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * ClassName: TestObjectOutputStream
+ * Package: com.lc.day18.io2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 10:41
+ * @Version 1.0
+ */
+public class TestObject {
+
+    @Test
+    public void test06() throws IOException, ClassNotFoundException {
+
+        ObjectInputStream os = new ObjectInputStream(new FileInputStream("files\\emp.dat"));
+
+        List<Employee> list = (List<Employee>) os.readObject();
+
+        System.out.println(list);
+
+    }
+
+    @Test
+    public void test05() throws IOException, ClassNotFoundException {
+
+        ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream("files\\emp.dat"));
+
+        Employee emp1 = new Employee("tom","北京",22);
+        Employee emp2 = new Employee("tom","北京",22);
+        Employee emp3 = new Employee("tom","北京",22);
+
+        List<Employee> list = new ArrayList<>();
+        list.add(emp1);
+        list.add(emp2);
+        list.add(emp3);
+
+        os.writeObject(list);
+
+        os.close();
+    }
+
+    @Test
+    public void test04() throws IOException, ClassNotFoundException {
+
+        ObjectInputStream os = new ObjectInputStream(new FileInputStream("files\\emp.dat"));
+
+        Employee o = (Employee) os.readObject();
+
+        System.out.println(o);
+
+    }
+
+    @Test
+    public void test03() throws IOException {
+
+        ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream("files\\emp.dat"));
+
+        Employee emp1 = new Employee("tom","北京",22);
+
+        os.writeObject(emp1);
+
+        os.close();
+
+    }
+
+
+    @Test
+    public void test02() throws IOException {
+        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("files\\person.dat"));
+        int age = ois.readInt();
+        char gender = ois.readChar();
+        int energy = ois.readInt();
+        double price =  ois.readDouble();
+        boolean relive =  ois.readBoolean();
+
+        System.out.println(age);
+        System.out.println(gender);
+        System.out.println(energy);
+        System.out.println(price);
+        System.out.println(relive);
+
+        ois.close();
+    }
+
+    @Test
+    public void test01() throws IOException {
+
+        int age = 300;
+        char gender = '男';
+        int energy = 5000;
+        double price = 75.5;
+        boolean relive = true;
+
+        String name = "巫师";
+
+        ObjectOutputStream objectOutput = new ObjectOutputStream(new FileOutputStream("files\\person.dat"));
+
+        objectOutput.writeInt(age);
+        objectOutput.writeChar(gender);
+        objectOutput.writeInt(energy);
+        objectOutput.writeDouble(price);
+        objectOutput.writeBoolean(relive);
+
+        objectOutput.close();
+
+    }
+}

+ 39 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/Logger.java

@@ -0,0 +1,39 @@
+package com.lc.day18.io3;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * ClassName: Logger
+ * Package: com.lc.day18.io3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 14:39
+ * @Version 1.0
+ */
+public class Logger {
+    /*
+记录日志的方法。
+ */
+    public static void log(String msg) {
+        try {
+            // 指向一个日志文件
+            PrintStream out = new PrintStream(new FileOutputStream("files\\log.txt", true));
+            // 改变输出方向
+            System.setOut(out);
+            // 日期当前时间
+            Date nowTime = new Date();
+
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
+            String strTime = sdf.format(nowTime);
+
+            System.out.println(strTime + ": " + msg);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 27 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestLogger.java

@@ -0,0 +1,27 @@
+package com.lc.day18.io3;
+
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * ClassName: Logger
+ * Package: com.lc.day18.io3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 14:39
+ * @Version 1.0
+ */
+public class TestLogger {
+    @Test
+    public void test01(){
+        Logger.log("调用了System类的gc()方法,建议启动垃圾回收");
+        Logger.log("调用了TeamView的addMember()方法");
+        Logger.log("用户尝试进行登录,验证失败");
+    }
+}

+ 82 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestOther.java

@@ -0,0 +1,82 @@
+package com.lc.day18.io3;
+
+import org.junit.Test;
+
+import java.io.*;
+
+/**
+ * ClassName: TestOther
+ * Package: com.lc.day18.io3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 14:23
+ * @Version 1.0
+ */
+public class TestOther {
+
+    @Test
+    public void test04() throws Exception{
+        FileOutputStream fos = new FileOutputStream(new File("files\\text.txt"));
+        // 创建打印输出流,设置为自动刷新模式(写入换行符或字节 '\n' 时都会刷新输出缓冲区)
+        PrintStream ps = new PrintStream(fos, true);
+        if (ps != null) {// 把标准输出流(控制台输出)改成文件
+            System.setOut(ps);
+        }
+        for (int i = 0; i <= 255; i++) { // 输出ASCII字符
+            System.out.print((char) i);
+            if (i % 50 == 0) { // 每50个数据一行
+                System.out.println(); // 换行
+            }
+        }
+    }
+
+    @Test
+    public void test03() throws FileNotFoundException {
+        PrintStream ps = new PrintStream("files\\io.txt");
+
+        ps.println("hello");
+        ps.println(1);
+        ps.println(1.5);
+
+        ps.close();
+    }
+
+    public static void main(String[] args) {
+        test02();
+    }
+
+    public static void test02(){
+        System.out.println("请输入信息(退出输入e或exit):");
+        // 把"标准"输入流(键盘输入)这个字节流包装成字符流,再包装成缓冲流
+        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+        String s = null;
+        try {
+            while ((s = br.readLine()) != null) { // 读取用户输入的一行数据 --> 阻塞程序
+                if ("e".equalsIgnoreCase(s) || "exit".equalsIgnoreCase(s)) {
+                    System.out.println("安全退出!!");
+                    break;
+                }
+                // 将读取到的整行字符串转成大写输出
+                System.out.println("-->:" + s.toUpperCase());
+                System.out.println("继续输入信息");
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (br != null) {
+                    br.close(); // 关闭过滤流时,会自动关闭它包装的底层节点流
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    @Test
+    public void test01(){
+        PrintStream out = System.out;
+        //PrintStream
+    }
+}

+ 49 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io3/TestScanner.java

@@ -0,0 +1,49 @@
+package com.lc.day18.io3;
+
+import org.junit.Test;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Scanner;
+
+/**
+ * ClassName: TestScanner
+ * Package: com.lc.day18.io3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 14:43
+ * @Version 1.0
+ */
+public class TestScanner {
+    public static void main(String[] args) throws IOException {
+        //test01();
+        test2();
+    }
+    public static void test01() throws IOException {
+        Scanner input = new Scanner(System.in);
+        PrintStream ps = new PrintStream("1.txt");
+        while(true){
+            System.out.print("请输入一个单词:");
+            String str = input.nextLine();
+            if("stop".equals(str)){
+                break;
+            }
+            ps.flush();
+            ps.println(str);
+        }
+        ps.close();
+        input.close();
+    }
+
+
+    public static void test2() throws IOException {
+        Scanner input = new Scanner(new FileInputStream("1.txt"));
+        while(input.hasNextLine()){
+            String str = input.nextLine();
+            System.out.println(str);
+        }
+        input.close();
+    }
+}

+ 57 - 0
01_JavaSe/JavaSe/day18/src/com/lc/day18/io4/TestCommon.java

@@ -0,0 +1,57 @@
+package com.lc.day18.io4;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+/**
+ * ClassName: TestCommon
+ * Package: com.lc.day18.io4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/6 15:30
+ * @Version 1.0
+ */
+public class TestCommon {
+
+    @Test
+    public void test01() throws Exception{
+        //实现复制
+        IOUtils.copy(new FileInputStream("img\\a.jpg") , new FileOutputStream("img\\b.jpg"));
+
+    }
+
+    //实现递归复制
+    //src:要复制的文件夹路径
+    //dest:要将文件夹粘贴到哪里去
+    @Test
+    public void test02() throws IOException {
+        FileUtils.copyDirectoryToDirectory(new File("img"),new File("imgs"));
+    }
+
+    //静态方法:void writeStringToFile(File file,String content):将内容content写入到file中
+
+    @Test
+    public void test03() throws IOException {
+        FileUtils.writeStringToFile(new File("img\\abc.txt"),"hahahahaha");
+    }
+
+    //静态方法:String readFileToString(File file):读取文件内容,并返回一个String
+    @Test
+    public void test04() throws IOException {
+        String s = FileUtils.readFileToString(new File("img\\abc.txt"));
+        System.out.println(s);
+    }
+
+    //静态方法:void copyFile(File srcFile,File destFile):文件复制
+    @Test
+    public void test05() throws IOException {
+        FileUtils.copyFile(new File("img\\abc.txt"),new File("img\\e.txt"));
+    }
+}

+ 29 - 0
01_JavaSe/JavaSe/day19/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 11 - 0
01_JavaSe/JavaSe/day19/day19.iml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 47 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/netapi/TestAdderss.java

@@ -0,0 +1,47 @@
+package com.lc.day19.netapi;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+/**
+ * ClassName: TestAdderss
+ * Package: com.lc.day19.netapi
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 9:46
+ * @Version 1.0
+ */
+public class TestAdderss {
+    /*
+    InetAddress 类没有提供公共的构造器,而是提供 了 如下几个 静态方法来获取InetAddress 实例
+
+    * public static InetAddress getLocalHost()
+    * public static InetAddress getByName(String host)
+    * public static InetAddress getByAddress(byte[] addr)
+
+    InetAddress 提供了如下几个常用的方法
+
+    * public String getHostAddress() :返回 IP 地址字符串(以文本表现形式)
+    * public String getHostName() :获取此 IP 地址的主机名
+    * public boolean isReachable(int timeout):测试是否可以达到该地址
+     */
+    public static void main(String[] args) throws IOException {
+//        InetAddress localHost = InetAddress.getLocalHost();
+        //公司地址
+//        InetAddress localHost = InetAddress.getByName("39.105.160.25");
+        byte[] address = new byte[]{(byte) 220,(byte)181,111,(byte)188};
+        InetAddress localHost = InetAddress.getByAddress(address);
+        String hostAddress = localHost.getHostAddress();
+        System.out.println("地址:"+hostAddress);
+
+        String hostName = localHost.getHostName();
+        System.out.println("名称:"+hostName);
+
+        boolean reachable = localHost.isReachable(20);
+        System.out.println(reachable);
+
+
+    }
+}

+ 45 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp1/Client.java

@@ -0,0 +1,45 @@
+package com.lc.day19.tcp1;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.Socket;
+
+/**
+ * ClassName: Client
+ * Package: com.lc.day19.tcp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 10:27
+ * @Version 1.0
+ */
+public class Client {
+    public static void main(String[] args) throws Exception {
+        //Socker ip port
+        Socket socket = new Socket("127.0.0.1",8888);
+
+        //发送给数据 服务端
+        //获取输出流
+        OutputStream os = socket.getOutputStream();
+        System.out.println("客户端发送hahahahaha");
+        //发送
+        byte[] bytes = "hahahahaha".getBytes();
+        os.write(bytes);
+        //关闭输出流
+        socket.shutdownOutput();
+
+        //接收
+        //换成 缓冲流
+        InputStream is = socket.getInputStream();
+        InputStreamReader isr = new InputStreamReader(is);
+        BufferedReader br = new BufferedReader(isr);
+
+        String s = br.readLine();
+        System.out.println("接收服务内容:"+s);
+        //关闭
+        socket.close();
+
+    }
+}

+ 50 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp1/Server.java

@@ -0,0 +1,50 @@
+package com.lc.day19.tcp1;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+/**
+ * ClassName: Server
+ * Package: com.lc.day19.tcp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 10:27
+ * @Version 1.0
+ */
+public class Server {
+
+    public static void main(String[] args) throws Exception {
+        //创建服务端
+        ServerSocket socket = new ServerSocket(8888);
+
+        //获取数据
+        Socket accept = socket.accept();
+        System.out.println("客户端链接成功");
+        //接收数据
+        InputStream is = accept.getInputStream();
+
+        //读取
+        StringBuffer sb = new StringBuffer();
+        byte[] bytes = new byte[1024];
+        int l;
+        while ( ( l = is.read(bytes) )  != -1 ){
+            String s = new String(bytes, 0, l);
+            sb.append(s);
+        }
+        System.out.println("客户端:"+sb.toString());
+
+        //返回消息
+        OutputStream os = accept.getOutputStream();
+        PrintStream ps = new PrintStream(os);
+        System.out.println("服务端:发送 欢迎连接");
+        ps.println("欢迎连接");
+
+        //关闭
+        accept.close();
+        socket.close();
+    }
+}

+ 49 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp2/Client.java

@@ -0,0 +1,49 @@
+package com.lc.day19.tcp2;
+
+import java.io.*;
+import java.net.Socket;
+import java.util.Scanner;
+
+/**
+ * ClassName: Client
+ * Package: com.lc.day19.tcp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 10:27
+ * @Version 1.0
+ */
+public class Client {
+    public static void main(String[] args) throws Exception {
+        //Socker ip port
+        Socket socket = new Socket("192.168.18.32",9999);
+
+        //发送给数据 服务端
+        //获取输出流
+        OutputStream os = socket.getOutputStream();
+        PrintStream printStream = new PrintStream(os);
+
+        //输出 缓冲流
+        InputStream is = socket.getInputStream();
+        InputStreamReader isr = new InputStreamReader(is);
+        BufferedReader br = new BufferedReader(isr);
+
+        //输入
+        System.out.println("请输入内容  stop 结束");
+        Scanner scanner = new Scanner(System.in);
+        while ( true ){
+            String  s= scanner.nextLine();
+            if ("stop".equals(s)){
+                break;
+            }
+
+            printStream.println(s);
+
+            String sss = br.readLine();
+            System.out.println("服:"+sss);
+        }
+
+        //关闭
+        socket.close();
+    }
+}

+ 78 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp2/Server.java

@@ -0,0 +1,78 @@
+package com.lc.day19.tcp2;
+
+import java.io.*;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+/**
+ * ClassName: Server
+ * Package: com.lc.day19.tcp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 10:27
+ * @Version 1.0
+ */
+public class Server {
+
+
+    public static void main(String[] args) throws Exception {
+        ServerSocket socket = null;
+        try {
+            //客户端数量
+            int count = 0;
+            //创建服务端
+            socket = new ServerSocket(9999);
+            System.out.println("等待链接");
+
+            while (true){
+                Socket accept = socket.accept();
+                System.out.println("客户端链接成功-数量"+(++count));
+
+                //创建线程
+                MessageThread messageThread = new MessageThread(accept);
+                //开启线程
+                messageThread.start();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }finally {
+            socket.close();
+        }
+
+    }
+}
+
+class MessageThread extends Thread{
+
+    InetAddress ip;
+    Socket socket;
+
+    public MessageThread(Socket socket) {
+        this.socket = socket;
+        this.ip = socket.getInetAddress();
+    }
+
+    @Override
+    public void run() {
+        try {
+            //接收
+            InputStream is = socket.getInputStream();
+            BufferedReader br = new BufferedReader(new InputStreamReader(is));
+
+            String str = null ;
+            while ( (str = br.readLine()) != null ){
+                System.out.println("客:"+str);
+                StringBuffer reverse = new StringBuffer(str).reverse();
+                //写回
+                OutputStream os = socket.getOutputStream();
+                PrintStream printStream = new PrintStream(os);
+                printStream.println(reverse);
+
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

+ 99 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp3/Client.java

@@ -0,0 +1,99 @@
+package com.lc.day19.tcp3;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.net.Socket;
+import java.util.Scanner;
+
+/**
+ * ClassName: Client
+ * Package: com.lc.day19.tcp3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 14:24
+ * @Version 1.0
+ */
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        //Socker
+        Socket socket = new Socket("192.168.18.32",9999);
+        //发送线程
+        SendThread send = new SendThread(socket);
+        send.start();
+
+        //接收线程
+        ReceiveThread receive = new ReceiveThread(socket);
+        receive.start();
+        //插队
+        send.join();
+
+
+    }
+}
+
+class SendThread extends Thread{
+
+    Socket socket;
+
+    public SendThread(Socket socket) {
+        this.socket = socket;
+    }
+
+    @Override
+    public void run() {
+        try {
+            //获取输出字节流
+            OutputStream os = socket.getOutputStream();
+            PrintStream ps = new PrintStream(os);
+            //键盘输入
+            Scanner scanner = new Scanner(System.in);
+            //循环
+            while (true){
+
+                String str = scanner.nextLine();
+                if (str.equals("bye")){
+                    break;
+                }
+                ps.println( "陈晨:"+ str);
+
+            }
+            socket.shutdownOutput();
+            socket.close();
+
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
+
+
+class ReceiveThread extends Thread{
+
+    Socket socket;
+
+    public ReceiveThread(Socket socket) {
+        this.socket = socket;
+    }
+
+    @Override
+    public void run() {
+        try {
+            //获取输入字节流
+            InputStream is = socket.getInputStream();
+            Scanner scanner = new Scanner(is);
+            //循环
+            while (scanner.hasNextLine()){
+                String s = scanner.nextLine();
+                System.out.println(socket.getInetAddress().getAddress()+":"+s);
+            }
+            socket.close();
+
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

+ 90 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp3/Server.java

@@ -0,0 +1,90 @@
+package com.lc.day19.tcp3;
+
+import java.io.*;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * ClassName: Server
+ * Package: com.lc.day19.tcp3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 14:12
+ * @Version 1.0
+ */
+public class Server {
+
+    //list
+    static List<Socket>  onlist = new ArrayList<>();
+
+    public static void main(String[] args) throws Exception {
+
+        ServerSocket socket = null;
+        try {
+            //客户端数量
+            int count = 0;
+            //创建服务端
+            socket = new ServerSocket(9999);
+
+            while (true){
+                Socket accept = socket.accept();
+                //添加到集合中
+                onlist.add(accept);
+                //消息转发
+                MessageHandler messageHandler = new MessageHandler(accept);
+                //开启线程
+                messageHandler.start();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    //静态类
+    static class MessageHandler extends Thread {
+
+        String ip;
+        Socket socket;
+
+        public MessageHandler(Socket socket) {
+            this.socket = socket;
+        }
+
+        @Override
+        public void run() {
+            try {
+                //调用发送消息方法. 显示上线
+                String ip = socket.getInetAddress().getHostAddress();
+                sendOther(ip+":上线了");
+
+                //获取消息
+                InputStream is = socket.getInputStream();
+                BufferedReader br = new BufferedReader(new InputStreamReader(is));
+
+                String str ;
+                while (  (str = br.readLine()) != null ){
+                    sendOther(str);
+                }
+
+                sendOther(ip+":下线了");
+                socket.close();
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            } finally {
+               onlist.remove(socket);
+            }
+
+        }
+        //消息转发
+        public static void sendOther( String message )throws Exception{
+            for (Socket socket : onlist) {
+                OutputStream os = socket.getOutputStream();
+                PrintStream ps = new PrintStream(os);
+                ps.println(message);
+            }
+        }
+    }
+}
+

+ 82 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp4/Client.java

@@ -0,0 +1,82 @@
+package com.lc.day19.tcp4;
+import java.io.*;
+import java.io.BufferedWriter;
+import java.io.OutputStreamWriter;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.util.Scanner;
+/**
+ * @Author 张甫鑫 by 2023/8/8 14:37
+ */
+public class Client {
+    public static void main(String[] args) throws IOException, InterruptedException {
+        InetAddress localHost = InetAddress.getLocalHost();
+        System.out.println(localHost);
+        Socket  socket=new Socket("127.0.0.1",8888);
+
+        Send send = new Send(socket);
+        send.start();
+
+        Receive  receive = new Receive(socket);
+        receive.start();
+        send.join();
+    }
+}
+class Send extends Thread{
+    String ip;
+    Socket accept;
+    public Send(Socket accept) {
+        try {
+            this.ip=InetAddress.getLocalHost().getHostAddress();
+            this.accept = accept;
+        } catch (UnknownHostException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @Override
+    public void run() {
+        try {
+            Scanner sc=new Scanner(System.in);
+            OutputStream outputStream = accept.getOutputStream();
+            BufferedWriter out=new BufferedWriter(new OutputStreamWriter(outputStream));
+            while (true){
+                String s = sc.nextLine();
+                if (s.equals("bye")){
+                    break;
+                }
+                out.write(s+"\n");
+            }
+            accept.close();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
+class Receive extends Thread{
+    String ip;
+    Socket accept;
+    public Receive(Socket accept) {
+        try {
+            this.ip=InetAddress.getLocalHost().getHostAddress();
+            this.accept = accept;
+        } catch (UnknownHostException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @Override
+    public void run() {
+        try {
+            InputStream inputStream = accept.getInputStream();
+            Scanner sc=new Scanner(inputStream);
+            String s;
+            while (sc.hasNextLine()) {
+                s=sc.nextLine();
+                System.out.println(s);
+            }
+            accept.close();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

+ 75 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/tcp4/Server.java

@@ -0,0 +1,75 @@
+package com.lc.day19.tcp4;
+
+import java.io.*;
+import java.io.OutputStreamWriter;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * @Author 张甫鑫 by 2023/8/8 14:37
+ */
+public class Server {
+    //定义在线用户集合
+    static List<Socket> list=new ArrayList();
+    public static void main(String[] args) throws IOException {
+        ServerSocket server=new ServerSocket(8888);
+        while (true){
+            //接收到用户
+            Socket accept = server.accept();
+            //添加到上线用户集合
+            list.add(accept);
+            //开启线程
+            Send send=new Send(accept);
+            send.start();
+        }
+    }
+    //内部类:向客户端发送消息
+    static  class Send extends Thread {
+        String ip;
+        Socket accept;
+        public Send(Socket accept) {
+            try {
+                this.ip=InetAddress.getLocalHost().getHostAddress();
+                this.accept = accept;
+            } catch (UnknownHostException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        @Override
+        public void run() {
+
+            try {
+                //用户上线通知
+                message(this.ip+"上线了");
+                //接收消息
+                InputStream inputStream = accept.getInputStream();
+                BufferedReader in=new BufferedReader(new InputStreamReader(inputStream));
+                String s = null;
+                //发送消息
+                while ((s = in.readLine()) != null){
+                    message(this.ip+"说:"+s);
+                }
+                message(this.ip+"下了");
+                accept.close();
+                list.remove(accept);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        //向所有用户发送消息
+        public static void message(String s) throws IOException {
+            for(Socket o:list){
+                OutputStream outputStream = o.getOutputStream();
+                BufferedWriter out=new BufferedWriter(new OutputStreamWriter(outputStream));
+                //PrintStream ps = new PrintStream(outputStream);
+                out.write(s+"\r\n");
+                out.flush();
+                //ps.println();
+                //o.shutdownOutput();
+            }
+        }
+    }
+}

+ 33 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/udp1/DatagramSocket1.java

@@ -0,0 +1,33 @@
+package com.lc.day19.udp1;
+
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+
+/**
+ * ClassName: DatagramSocket1
+ * Package: com.lc.day19.udp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 16:10
+ * @Version 1.0
+ */
+public class DatagramSocket1 {
+    public static void main(String[] args) {
+        DatagramSocket ds = null;
+        try {
+            ds = new DatagramSocket();
+
+            byte[] by = "hello,lc.com".getBytes();
+
+            DatagramPacket dp = new DatagramPacket(by, 0, by.length, InetAddress.getByName("127.0.0.1"), 10000);
+            ds.send(dp);
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (ds != null)
+                ds.close();
+        }
+    }
+}

+ 32 - 0
01_JavaSe/JavaSe/day19/src/com/lc/day19/udp1/DatagramSocket2.java

@@ -0,0 +1,32 @@
+package com.lc.day19.udp1;
+
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+
+/**
+ * ClassName: DatagramSocket2
+ * Package: com.lc.day19.udp1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/8 16:11
+ * @Version 1.0
+ */
+public class DatagramSocket2 {
+    public static void main(String[] args) {
+        DatagramSocket ds = null;
+        try {
+            ds = new DatagramSocket(10000);
+            byte[] by = new byte[1024*64];
+            DatagramPacket dp = new DatagramPacket(by, by.length);
+            ds.receive(dp);
+            String str = new String(dp.getData(), 0, dp.getLength());
+            System.out.println(str + "--" + dp.getAddress());
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (ds != null)
+                ds.close();
+        }
+    }
+}

+ 29 - 0
01_JavaSe/JavaSe/day20/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 21 - 0
01_JavaSe/JavaSe/day20/day20.iml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library name="JUnit4">
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
+          <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+  </component>
+</module>

+ 50 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect/Person.java

@@ -0,0 +1,50 @@
+package com.lc.day20.reflect;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day20.reflect
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 9:44
+ * @Version 1.0
+ */
+public class Person extends A implements B,C {
+
+    String name;
+    Integer age;
+
+    public Person(String name, Integer age) {
+        this.name = name;
+        this.age = age;
+    }
+
+    public Person() {
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getAge() {
+        return age;
+    }
+
+    public void setAge(Integer age) {
+        this.age = age;
+    }
+}
+
+class A{
+
+}
+interface B{
+
+}
+interface C{
+
+}

+ 105 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect/Test01.java

@@ -0,0 +1,105 @@
+package com.lc.day20.reflect;
+
+import org.junit.Test;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * ClassName: Test01
+ * Package: com.lc.day20.reflect
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 9:34
+ * @Version 1.0
+ */
+public class Test01 {
+    //那些类型可以获取class
+    public static void main(String[] args) {
+        String s = new String("1");
+        //继承
+        Class aClass = s.getClass();
+
+        //.class
+        Class stringClass = String.class;
+
+        Class<Integer> integerClass = int.class;
+
+        Class<int[]> aClass1 = int[].class;
+
+        Class<Void> voidClass = void.class;
+
+        Class<Runnable> runnableClass = Runnable.class;
+
+    }
+
+    //获取Class类的实例(四种方法)
+    @Test
+    public void test01() throws ClassNotFoundException {
+        //对象 getClass
+        String a = new String();
+        Class<? extends String> aClass = a.getClass();
+
+        System.out.println(aClass);
+
+        //.class
+        Class<String> stringClass = String.class;
+
+        System.out.println(stringClass);
+
+        //Class.forName("类路径")
+        Class<?> aClass1 = Class.forName("java.lang.String");
+
+        System.out.println(aClass1);
+
+        //加载器
+        ClassLoader classLoader = Test01.class.getClassLoader();
+        Class<?> aClass2 = classLoader.loadClass("java.lang.String");
+
+        System.out.println(aClass2);
+
+
+    }
+
+
+
+    @Test
+    public void test02(){
+        //获取Person.calss
+        Class<Person> personClass = Person.class;
+        //获取名称
+        String name = personClass.getName();
+        System.out.println(name);
+        //获取构造方法
+        Constructor<?>[] constructors = personClass.getConstructors();
+        for (Constructor<?> constructor : constructors) {
+
+            System.out.println(constructor);
+
+        }
+
+        //获取父类
+        Class<? super Person> superclass = personClass.getSuperclass();
+        System.out.println(superclass);
+
+        //获取接口
+        Class<?>[] interfaces = personClass.getInterfaces();
+        for (Class<?> anInterface : interfaces) {
+            System.out.println(anInterface);
+        }
+
+        //获取方法
+        Method[] methods = personClass.getMethods();
+        for (Method method : methods) {
+            System.out.println(method);
+        }
+
+        //属性
+        Field[] fields = personClass.getDeclaredFields();
+        for (Field field : fields) {
+            System.out.println(field);
+        }
+    }
+}

+ 20 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Check.java

@@ -0,0 +1,20 @@
+package com.lc.day20.reflect1;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class Check {
+
+    @org.junit.Test
+    public void test03() throws IOException {
+        InputStream resourceAsStream = Check.class.getClassLoader().getResourceAsStream("jdbc.properties");
+        Properties properties = new Properties();
+        properties.load(resourceAsStream);
+        String username = (String) properties.get("username");
+        String password = (String) properties.get("password");
+        System.out.println("username = " + username);
+        System.out.println("password = " + password);
+    }
+}

+ 40 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Person.java

@@ -0,0 +1,40 @@
+package com.lc.day20.reflect1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day20.reflect
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 9:44
+ * @Version 1.0
+ */
+public class Person  {
+
+    String name;
+    Integer age;
+
+    public Person(String name, Integer age) {
+        this.name = name;
+        this.age = age;
+    }
+
+    public Person() {
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getAge() {
+        return age;
+    }
+
+    public void setAge(Integer age) {
+        this.age = age;
+    }
+}

+ 69 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect1/Test02.java

@@ -0,0 +1,69 @@
+package com.lc.day20.reflect1;
+
+import org.junit.Test;
+
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * ClassName: Test02
+ * Package: com.lc.day20.reflect1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 10:34
+ * @Version 1.0
+ */
+public class Test02 {
+    @Test
+    public void test03() throws Exception {
+        InputStream resourceAsStream =
+                Test02.class.getClassLoader().getResourceAsStream("jdbc.properties");
+        //Properties
+        Properties properties = new Properties();
+        //加载
+        properties.load(resourceAsStream);
+
+        String username = (String) properties.get("username");
+        String password = (String) properties.get("password");
+
+        System.out.println(username);
+        System.out.println(password);
+
+    }
+
+    @Test
+    public void test02() throws ClassNotFoundException {
+        //应用类加载器
+        ClassLoader classLoader = Test02.class.getClassLoader();
+        System.out.println(classLoader);
+
+        //父类
+        ClassLoader parent = classLoader.getParent();
+        System.out.println(parent);
+
+        //引导类加载器
+        ClassLoader parent1 = parent.getParent();
+        System.out.println(parent1);
+    }
+
+    @Test
+    public void test01() throws ClassNotFoundException {
+
+        //当前类的加载器
+        ClassLoader loader = Test02.class.getClassLoader();
+        System.out.println(loader);
+
+        //Obj 的类加载器
+        Class<?> aClass = Class.forName("java.lang.Object");
+        ClassLoader classLoader = aClass.getClassLoader();
+        System.out.println(classLoader);
+
+        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
+        System.out.println(systemClassLoader);
+        //平台类加载器
+        ClassLoader platformClassLoader = ClassLoader.getPlatformClassLoader();
+        System.out.println(platformClassLoader);
+
+    }
+}

+ 34 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect2/LCDemo.java

@@ -0,0 +1,34 @@
+package com.lc.day20.reflect2;
+
+/**
+ * ClassName: LCDemo
+ * Package: com.lc.day20.reflect2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 15:50
+ * @Version 1.0
+ */
+public class LCDemo {
+
+    private String name;
+
+//    public LCDemo() {
+//    }
+
+    public LCDemo(String name) {
+        this.name = name;
+    }
+
+    public String show(){
+        return this.name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 55 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect2/TestDemo.java

@@ -0,0 +1,55 @@
+package com.lc.day20.reflect2;
+
+import org.junit.Test;
+
+import java.lang.reflect.Constructor;
+
+/**
+ * ClassName: TestDemo
+ * Package: com.lc.day20.reflect2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 15:51
+ * @Version 1.0
+ */
+public class TestDemo {
+
+    @Test
+    public void test01() throws Exception {
+        Class lcDemoClass = LCDemo.class;
+
+        //获取构造方法
+        Constructor declaredConstructor = lcDemoClass.getDeclaredConstructor(String.class);
+
+        //构造方法
+        Object o = declaredConstructor.newInstance("jarry");
+        //强制转换
+        LCDemo lc = (LCDemo) o;
+        //展示
+        System.out.println(lc.show());
+
+    }
+
+    //默认构造方法
+    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
+
+        //1 class
+        //2 new intance
+        //class
+        Class lcDemoClass = LCDemo.class;
+        //创建对象
+        //无参数的构造
+        Object o = lcDemoClass.newInstance();
+
+        if ( o instanceof LCDemo ){
+            LCDemo lc = (LCDemo) o;
+
+            lc.setName("tom");
+            String show = lc.show();
+            System.out.println(show);
+        }
+
+    }
+
+}

+ 37 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect3/Person.java

@@ -0,0 +1,37 @@
+package com.lc.day20.reflect3;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day20.reflect2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:20
+ * @Version 1.0
+ */
+public class Person {
+
+    private String name;
+    private Integer age;
+
+
+
+
+    public String info(){
+        return "name-"+name + ":age-"+age;
+    }
+
+    public void set( String name, Integer age ){
+        this.name = name;
+        this.age = age;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Person{" +
+                "name='" + name + '\'' +
+                ", age=" + age +
+                '}';
+    }
+}

+ 48 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect3/TestPerson.java

@@ -0,0 +1,48 @@
+package com.lc.day20.reflect3;
+
+import org.junit.Test;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+/**
+ * ClassName: TestPerson
+ * Package: com.lc.day20.reflect3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:20
+ * @Version 1.0
+ */
+public class TestPerson {
+
+
+    //获取所有属性及相关细节
+    @Test
+    public void test01() throws Exception {
+        //class 
+        Class personClass = Person.class;
+        //对象
+        Object o = personClass.newInstance();
+        //字段
+        Field name = personClass.getDeclaredField("name");
+        System.out.println(name);
+
+        //设置 可访问 暴力反射  可访问私有属性
+        name.setAccessible(true);
+        Object o1 = name.get(o);
+        System.out.println("name:"+o1);
+
+        //设置值
+        name.set(o,"tom");  // setName"tom"
+
+        //获取
+        Object o2 = name.get(o);
+        System.out.println("name:"+o2);
+
+    }
+
+
+
+
+}

+ 85 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/OtherTest.java

@@ -0,0 +1,85 @@
+package com.lc.day20.reflect4;
+
+import org.junit.Test;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+
+/**
+ * ClassName: OtherTest
+ * Package: com.lc.day20.reflect4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:41
+ * @Version 1.0
+ */
+public class OtherTest {
+    /*
+    	获取当前类中的所有的构造器
+     */
+    @Test
+    public void test1(){
+        Class clazz = Person.class;
+        Constructor[] cons = clazz.getDeclaredConstructors();
+        for(Constructor c :cons){
+            System.out.println(c);
+        }
+    }
+    /*
+    	获取运行时类的父类
+     */
+    @Test
+    public void test2(){
+        Class clazz = Person.class;
+        Class superclass = clazz.getSuperclass();
+        System.out.println(superclass);//class com.lc.java1.Creature
+    }
+    /*
+    	获取运行时类的所在的包
+     */
+    @Test
+    public void test3(){
+        Class clazz = Person.class;
+        Package pack = clazz.getPackage();
+        System.out.println(pack);
+
+    }
+    /*
+    	获取运行时类的注解
+     */
+    @Test
+    public void test4(){
+        Class clazz = Person.class;
+        Annotation[] annos = clazz.getAnnotations();
+        for (Annotation anno : annos) {
+            System.out.println(anno);
+        }
+    }
+
+    /*
+    	获取运行时类所实现的接口
+     */
+    @Test
+    public void test5(){
+        Class clazz = Person.class;
+        Class[] interfaces = clazz.getInterfaces();
+        for (Class anInterface : interfaces) {
+
+            System.out.println(anInterface);
+        }
+    }
+    /*
+    	获取运行时类的带泛型的父类
+     */
+    @Test
+    public void test6(){
+        Class clazz = Person.class;
+        Type genericSuperclass = clazz.getGenericSuperclass();
+
+        System.out.println(genericSuperclass);
+    }
+}

+ 48 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/Person.java

@@ -0,0 +1,48 @@
+package com.lc.day20.reflect4;
+
+import org.junit.Test;
+
+import java.beans.JavaBean;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day20.reflect2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:20
+ * @Version 1.0
+ */
+@SuppressWarnings("all")
+@JavaBean
+public class Person extends A<String,Integer> {
+
+    private String name;
+    private Integer age;
+
+
+
+    public String info(){
+        return "name-"+name + ":age-"+age;
+    }
+
+
+    public void set( String name, Integer age ) throws Exception{
+        this.name = name;
+        this.age = age;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Person{" +
+                "name='" + name + '\'' +
+                ", age=" + age +
+                '}';
+    }
+}
+class A<T,R>{
+
+}

+ 73 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestFiled.java

@@ -0,0 +1,73 @@
+package com.lc.day20.reflect4;
+
+import com.lc.day20.reflect3.Person;
+import org.junit.Test;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+/**
+ * ClassName: TestFiled
+ * Package: com.lc.day20.reflect4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:37
+ * @Version 1.0
+ */
+public class TestFiled {
+    @Test
+    public void test1(){
+
+        Class clazz = Person.class;
+        //getFields():获取到运行时类本身及其所有的父类中声明为public权限的属性
+//		Field[] fields = clazz.getFields();
+//
+//		for(Field f : fields){
+//			System.out.println(f);
+//		}
+
+        //getDeclaredFields():获取当前运行时类中声明的所有属性
+        Field[] declaredFields = clazz.getDeclaredFields();
+        for(Field f : declaredFields){
+            System.out.println(f);
+        }
+    }
+
+    //权限修饰符  变量类型  变量名
+    @Test
+    public void test2(){
+        Class clazz = Person.class;
+        Field[] declaredFields = clazz.getDeclaredFields();
+        for(Field f : declaredFields){
+            //1.权限修饰符
+            /*
+             * 0x是十六进制
+             * PUBLIC           = 0x00000001;  1    1
+             * PRIVATE          = 0x00000002;  2	10
+             * PROTECTED        = 0x00000004;  4	100
+             * STATIC           = 0x00000008;  8	1000
+             * FINAL            = 0x00000010;  16	10000
+             * ...
+             *
+             * 设计的理念,是用二进制的某一位是1,代表一种修饰符,整个二进制中只有一位是1,其余都是0
+             *
+             * mod = 17          0x00000011
+             * if ((mod & PUBLIC) != 0)  说明修饰符中有public
+             * if ((mod & FINAL) != 0)   说明修饰符中有final
+             */
+            int modifier = f.getModifiers();
+            System.out.print(Modifier.toString(modifier) + "\t");
+
+//            //2.数据类型
+            Class type = f.getType();
+            System.out.print(type.getName() + "\t");
+//
+//            //3.变量名
+            String fName = f.getName();
+            System.out.print(fName);
+//
+            System.out.println();
+        }
+    }
+}

+ 47 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestGeneric.java

@@ -0,0 +1,47 @@
+package com.lc.day20.reflect4;
+
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+/**
+ * ClassName: TestGeneric
+ * Package: com.lc.day20.reflect4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:49
+ * @Version 1.0
+ */
+public class TestGeneric {
+    public static void main(String[] args) {
+        //需求:在运行时,获取Son类型的泛型父类的泛型实参<String,Integer>
+
+        //(1)还是先获取Class对象
+        Class clazz = Son.class;//四种形式任意一种都可以
+
+        //(2)获取泛型父类
+//		Class sc = clazz.getSuperclass();
+//		System.out.println(sc);
+        /*
+         * getSuperclass()只能得到父类名,无法得到父类的泛型实参列表
+         */
+        Type type = clazz.getGenericSuperclass();
+
+        // Father<String,Integer>属于ParameterizedType
+        ParameterizedType pt = (ParameterizedType) type;
+
+        //(3)获取泛型父类的泛型实参列表
+        Type[] typeArray = pt.getActualTypeArguments();
+        for (Type type2 : typeArray) {
+            System.out.println(type2);
+        }
+    }
+}
+//泛型形参:<T,U>
+class Father<T,U>{
+
+}
+//泛型实参:<String,Integer>
+class Son extends Father<String,Integer>{
+
+}

+ 85 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect4/TestMethod.java

@@ -0,0 +1,85 @@
+package com.lc.day20.reflect4;
+
+import org.junit.Test;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * ClassName: TestMethod
+ * Package: com.lc.day20.reflect4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:38
+ * @Version 1.0
+ */
+public class TestMethod {
+    @Test
+    public void test1() {
+
+        Class clazz = Person.class;
+
+        // getDeclaredMethods():获取当前运行时类中声明的所有方法
+        Method[] declaredMethods = clazz.getDeclaredMethods();
+        for (Method m : declaredMethods) {
+            System.out.println(m);
+        }
+        //
+    }
+
+    // 注解信息
+    // 权限修饰符 返回值类型 方法名(形参类型1 参数1,形参类型2 参数2,...) throws 异常类型1,...{}
+    @Test
+    public void test2() {
+        Class clazz = Person.class;
+        Method[] declaredMethods = clazz.getDeclaredMethods();
+        for (Method m : declaredMethods) {
+            // 1.获取方法声明的注解
+            Annotation[] annos = m.getAnnotations();
+            for (Annotation a : annos) {
+                System.out.println(a);
+            }
+
+            // 2.权限修饰符
+            System.out.print(Modifier.toString(m.getModifiers()) + "\t");
+
+            // 3.返回值类型
+            System.out.print(m.getReturnType().getName() + "\t");
+
+            // 4.方法名
+            System.out.print(m.getName());
+            System.out.print("(");
+            // 5.形参列表
+            Class[] parameterTypes = m.getParameterTypes();
+            if (!(parameterTypes == null && parameterTypes.length == 0)) {
+                for (int i = 0; i < parameterTypes.length; i++) {
+
+                    if (i == parameterTypes.length - 1) {
+                        System.out.print(parameterTypes[i].getName()+"args_" + i);
+                        break;
+                    }
+
+                    System.out.print(parameterTypes[i].getName()+"args_" + i + ",");
+                }
+            }
+
+            System.out.print("-------------------");
+
+            // 6.抛出的异常
+            Class[] exceptionTypes = m.getExceptionTypes();
+            if (exceptionTypes.length > 0) {
+                System.out.print("throws ");
+                for (int i = 0; i < exceptionTypes.length; i++) {
+                    if (i == exceptionTypes.length - 1) {
+                        System.out.print(exceptionTypes[i].getName());
+                        break;
+                    }
+                    System.out.print(exceptionTypes[i].getName() + ",");
+                }
+            }
+            System.out.println();
+        }
+    }
+}

+ 43 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/Student.java

@@ -0,0 +1,43 @@
+package com.lc.day20.reflect5;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day20.reflect5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:53
+ * @Version 1.0
+ */
+public class Student {
+    private int id;
+    private String name;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return "Student{" +
+                "id=" + id +
+                ", name='" + name + '\'' +
+                '}';
+    }
+
+    public static void showInfo(){
+        System.out.println("showInfo");
+    }
+}

+ 47 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/TestField.java

@@ -0,0 +1,47 @@
+package com.lc.day20.reflect5;
+
+import org.junit.Test;
+
+import java.lang.reflect.Field;
+
+/**
+ * ClassName: TestField
+ * Package: com.lc.day20.reflect5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:53
+ * @Version 1.0
+ */
+public class TestField {
+
+
+
+    @Test
+    public void test01() throws Exception {
+
+        Class<Student> clazz = Student.class;
+
+        Student student = clazz.newInstance();
+
+        //获取属性字段
+        Field nameFiled = clazz.getDeclaredField("name");
+        Field idFiled = clazz.getDeclaredField("id");
+
+        //可访问
+        nameFiled.setAccessible(true);
+        idFiled.setAccessible(true);
+
+        //访问值
+        System.out.println("id:"+idFiled.get(student));
+        System.out.println("name:"+nameFiled.get(student));
+
+        //设置值
+        idFiled.set(student,1001);
+        nameFiled.set(student,"kunkun");
+
+        System.out.println(student);
+
+
+    }
+}

+ 49 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect5/TestMethod.java

@@ -0,0 +1,49 @@
+package com.lc.day20.reflect5;
+
+import org.junit.Test;
+
+import java.lang.reflect.Method;
+
+/**
+ * ClassName: TestMethod
+ * Package: com.lc.day20.reflect5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 16:58
+ * @Version 1.0
+ */
+public class TestMethod {
+    @Test
+    public void test01() throws Exception{
+
+        Class<Student> clazz = Student.class;
+
+        Student student = clazz.newInstance();
+
+        //获取方法
+        Method setName = clazz.getDeclaredMethod("setName", String.class);
+
+        //执行
+        Object invoke = setName.invoke(student, "kunkun 1号");
+        System.out.println(invoke);
+
+        //get方法
+        Method getName = clazz.getDeclaredMethod("getName");
+
+        Object invoke1 = getName.invoke(student);
+        System.out.println(invoke1);
+
+
+    }
+
+    @Test
+    public void test02() throws Exception{
+        Class<Student> clazz = Student.class;
+
+        Method showInfo = clazz.getDeclaredMethod("showInfo");
+        //调用静态方法 不需要 obj 对象
+        Object invoke = showInfo.invoke(null);
+        System.out.println(invoke);
+    }
+}

+ 40 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect6/TestUser.java

@@ -0,0 +1,40 @@
+package com.lc.day20.reflect6;
+
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.util.Properties;
+
+/**
+ * ClassName: User
+ * Package: com.lc.day20.reflect6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:24
+ * @Version 1.0
+ */
+public class TestUser {
+    @Test
+    public void test01() throws Exception {
+        //文件 user.properties
+        InputStream is = TestUser.class.getClassLoader().getResourceAsStream("user.properties");
+        //properties
+        Properties properties = new Properties();
+        properties.load(is);
+        //加载class
+        Class<?> clazzUser = Class.forName(properties.getProperty("className"));
+
+        //创建对象
+        Object user = clazzUser.newInstance();
+
+        //获取方法
+        Method showMethod = clazzUser.getDeclaredMethod(properties.getProperty("methodName"));
+
+        //执行
+        Object invoke = showMethod.invoke(user);
+
+    }
+}

+ 23 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect6/User.java

@@ -0,0 +1,23 @@
+package com.lc.day20.reflect6;
+
+/**
+ * ClassName: User
+ * Package: com.lc.day20.reflect6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:24
+ * @Version 1.0
+ */
+public class User {
+    private String name;
+
+    public User() {
+    }
+    public User(String name) {
+        this.name = name;
+    }
+    public void show(){
+        System.out.println("我是一个脉脉平台的用户");
+    }
+}

+ 20 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Column.java

@@ -0,0 +1,20 @@
+package com.lc.day20.reflect7;
+
+import java.lang.annotation.*;
+
+/**
+ * ClassName: Column
+ * Package: com.lc.day20.reflect7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:53
+ * @Version 1.0
+ */
+@Inherited
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Column {
+    String columnName(); //sql 字段
+    String columnType(); //java 类型
+}

+ 42 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Student.java

@@ -0,0 +1,42 @@
+package com.lc.day20.reflect7;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day20.reflect7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:54
+ * @Version 1.0
+ */
+@Table("t_student")
+public class Student {
+    @Column(columnName = "sid",columnType = "int")
+    private int id;
+    @Column(columnName = "sname",columnType = "varchar(20)")
+    private String name;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return "Student{" +
+                "id=" + id +
+                ", name='" + name + '\'' +
+                '}';
+    }
+}

+ 19 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/Table.java

@@ -0,0 +1,19 @@
+package com.lc.day20.reflect7;
+
+import java.lang.annotation.*;
+
+/**
+ * ClassName: Table
+ * Package: com.lc.day20.reflect7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:53
+ * @Version 1.0
+ */
+@Inherited
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Table {
+    String value();
+}

+ 59 - 0
01_JavaSe/JavaSe/day20/src/com/lc/day20/reflect7/TestAnnotation.java

@@ -0,0 +1,59 @@
+package com.lc.day20.reflect7;
+
+import java.lang.reflect.Field;
+import java.sql.SQLOutput;
+
+/**
+ * ClassName: TestAnnotation
+ * Package: com.lc.day20.reflect7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/9 17:55
+ * @Version 1.0
+ */
+public class TestAnnotation {
+
+    public static void main(String[] args) {
+        //class
+        Class<Student> studentClass = Student.class;
+
+        //获取注解
+        Table tableAnno = studentClass.getAnnotation(Table.class);
+        //获取value
+        String tabName = tableAnno.value();
+        //System.out.println(tabName);
+
+        //属性注解
+        Field[] fields = studentClass.getDeclaredFields();
+
+        //数组
+        String[] columns = new String[fields.length];
+        int index = 0;
+        for (Field field : fields) {
+            //字段注解
+            Column column = field.getAnnotation(Column.class);
+
+            String c = column.columnName();
+            columns[index]= c;
+            index++;
+        }
+
+        String sql = " select ";
+        //循环
+        for (int i = 0; i < columns.length; i++) {
+            if ( i ==  columns.length - 1){
+                sql+=columns[i];
+            }else{
+                sql+=columns[i] + " , ";
+            }
+        }
+
+        sql += " from "+ tabName;
+
+        //select name , age from t_student
+        System.out.println(sql);
+
+    }
+
+}

+ 2 - 0
01_JavaSe/JavaSe/day20/src/jdbc.properties

@@ -0,0 +1,2 @@
+username=zs
+password=123456

+ 2 - 0
01_JavaSe/JavaSe/day20/src/user.properties

@@ -0,0 +1,2 @@
+className:com.lc.day20.reflect6.User
+methodName:show

+ 29 - 0
01_JavaSe/JavaSe/day21/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 21 - 0
01_JavaSe/JavaSe/day21/day21.iml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library name="JUnit4">
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
+          <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+  </component>
+</module>

+ 36 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer/Person.java

@@ -0,0 +1,36 @@
+package com.lc.day21.exer;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day21.exer
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 15:31
+ * @Version 1.0
+ */
+public class Person {
+    private String name;
+
+    public Person() {
+    }
+
+    public Person(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return "Person{" +
+                "name='" + name + '\'' +
+                '}';
+    }
+}

+ 64 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer/TestPerson.java

@@ -0,0 +1,64 @@
+package com.lc.day21.exer;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * ClassName: TestPerson
+ * Package: com.lc.day21.exer
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 15:33
+ * @Version 1.0
+ */
+public class TestPerson {
+
+    public static void main(String[] args) {
+        //第一支队伍
+        ArrayList<String> one=new ArrayList<>();
+        one.add("迪丽热巴");
+        one.add("宋远桥");
+        one.add("苏星河");
+        one.add("石破天");
+        one.add("石中玉");
+        one.add("老子");
+        one.add("庄子");
+        one.add("洪七公");
+        //第二支队伍
+        ArrayList<String> two=new ArrayList<>();
+        two.add("古力娜扎");
+        two.add("张无忌");
+        two.add("赵丽颖");
+        two.add("张三丰");
+        two.add("尼古拉斯赵四");
+        two.add("张天爱");
+        two.add("张二狗");
+
+        //1. 第一个队伍只要名字为3个字的成员姓名;存储到一个新集合中。
+        //List<String> list = one.stream().filter(e -> e.length() == 3).toList();
+        //2. 第一个队伍筛选之后只要前3个人;存储到一个新集合中。
+        //List<String> list1 = one.stream().limit(3).toList();
+
+        List<String> oneList = one.stream().filter(e -> e.length() == 3).limit(3).toList();
+
+        //3. 第二个队伍只要姓张的成员姓名;存储到一个新集合中。
+        //List<String> list2 = two.stream().filter(e -> e.startsWith("张")).toList();
+        //4. 第二个队伍筛选之后不要前2个人;存储到一个新集合中。
+        //List<String> list3 = two.stream().skip(2).toList();
+        List<String> twoList = two.stream().filter(e -> e.startsWith("张")).skip(2).toList();
+
+        //5. 将两个队伍合并为一个队伍;存储到一个新集合中。
+        List<String> list = new ArrayList<>();
+        list.addAll(oneList);
+        list.addAll(twoList);
+
+        //Stream
+        List<Person> list2 = Stream.concat(twoList.stream(), oneList.stream()).map(Person::new).toList();
+        //6. 根据姓名创建 Person 对象;存储到一个新集合中。
+        List<Person> list1 = list.stream().map(Person::new).toList();
+        //7. 打印整个队伍的Person对象信息。
+        list2.forEach(System.out::println);
+    }
+}

+ 47 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/Employee.java

@@ -0,0 +1,47 @@
+package com.lc.day21.exer1;
+
+/**
+ * ClassName: Employee
+ * Package: com.lc.day21.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 11:06
+ * @Version 1.0
+ */
+public class Employee {
+    private int id;
+    private String name;
+    private double salary;
+    public Employee(int id, String name, double salary) {
+        super();
+        this.id = id;
+        this.name = name;
+        this.salary = salary;
+    }
+    public Employee() {
+        super();
+    }
+    public int getId() {
+        return id;
+    }
+    public void setId(int id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    public double getSalary() {
+        return salary;
+    }
+    public void setSalary(double salary) {
+        this.salary = salary;
+    }
+    @Override
+    public String toString() {
+        return "Employee [id=" + id + ", name=" + name + ", salary=" + salary + "]";
+    }
+}

+ 57 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/Test01.java

@@ -0,0 +1,57 @@
+package com.lc.day21.exer1;
+
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * ClassName: Test01
+ * Package: com.lc.day21.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 11:02
+ * @Version 1.0
+ */
+public class Test01 {
+    @Test
+    public void test1(){
+        List<String> list = Arrays.asList("hello","java","lambda","lc");
+        list.forEach(s -> System.out.println(s));
+    }
+    @Test
+    public void test2(){
+        HashMap<Integer,String> map = new HashMap<>();
+        map.put(1, "hello");
+        map.put(2, "java");
+        map.put(3, "lambda");
+        map.put(4, "lc");
+        map.forEach((k,v) -> System.out.println(k+"->"+v));
+    }
+
+    @Test
+    public void test3(){
+        //流
+        Stream.generate(() -> Math.random()).forEach(num -> System.out.println(num));
+    }
+
+    @Test
+    public void test04(){
+        ArrayList<String> list = new ArrayList<>();
+        list.add("hello");
+        list.add("java");
+        list.add("lc");
+        list.add("ok");
+        list.add("yes");
+
+        list.forEach(str->System.out.println(str));
+        System.out.println();
+
+        list.removeIf(str->str.length()<5);
+        list.forEach(str->System.out.println(str));
+    }
+}

+ 46 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer1/TestLambda.java

@@ -0,0 +1,46 @@
+package com.lc.day21.exer1;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.function.BiConsumer;
+
+/**
+ * ClassName: TestLambda
+ * Package: com.lc.day21.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 11:07
+ * @Version 1.0
+ */
+public class TestLambda {
+
+    @Test
+    public void test01(){
+        HashMap<Integer,Employee> map = new HashMap<>();
+        Employee e1 = new Employee(1, "张三", 8000);
+        Employee e2 = new Employee(2, "李四", 9000);
+        Employee e3 = new Employee(3, "王五", 10000);
+        Employee e4 = new Employee(4, "赵六", 11000);
+        Employee e5 = new Employee(5, "钱七", 12000);
+
+        map.put(e1.getId(), e1);
+        map.put(e2.getId(), e2);
+        map.put(e3.getId(), e3);
+        map.put(e4.getId(), e4);
+        map.put(e5.getId(), e5);
+
+        map.forEach((k,v) -> System.out.println(k+"="+v));
+
+        System.out.println();
+
+        map.replaceAll((k,v)->{
+            if(v.getSalary()<10000){
+                v.setSalary(10000);
+            }
+            return v;
+        });
+        map.forEach((k,v) -> System.out.println(k+"="+v));
+    }
+}

+ 76 - 0
01_JavaSe/JavaSe/day21/src/com/lc/day21/exer2/Employee.java

@@ -0,0 +1,76 @@
+package com.lc.day21.exer2;
+
+/**
+ * ClassName: Employee
+ * Package: com.lc.day21.exer2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/8/10 11:13
+ * @Version 1.0
+ */
+public class Employee {
+    private int id;
+    private String name;
+    private char gender;
+    private int age;
+    private double salary;
+
+    public Employee(int id, String name, char gender, int age, double salary) {
+        super();
+        this.id = id;
+        this.name = name;
+        this.gender = gender;
+        this.age = age;
+        this.salary = salary;
+    }
+    public Employee() {
+        super();
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public char getGender() {
+        return gender;
+    }
+
+    public void setGender(char gender) {
+        this.gender = gender;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    public double getSalary() {
+        return salary;
+    }
+
+    public void setSalary(double salary) {
+        this.salary = salary;
+    }
+
+    @Override
+    public String toString() {
+        return "Employee [id=" + id + ", name=" + name + ", gender=" + gender + ", age=" + age + ", salary=" + salary
+                + "]";
+    }
+}

Some files were not shown because too many files changed in this diff