8 次代碼提交 bbd3725682 ... 6e28c38af0

作者 SHA1 備註 提交日期
  chenchen bbd3725682 上传文件至 '' 1 年之前
  xerga 6e28c38af0 api 1 年之前
  xerga 908ce18fb1 基础 1 年之前
  guyanqing cb2171b7c9 apiday02 1 年之前
  guyanqing b442c7cc4e oopday02 1 年之前
  guyanqing 020e6ede11 javase 1 年之前
  guyanqing 0b146bd531 day05-javase 1 年之前
  guyanqing 835356a206 javase-dayo4 1 年之前
共有 100 個文件被更改,包括 2610 次插入2078 次删除
  1. 0 8
      .idea/.gitignore
  2. 0 6
      .idea/misc.xml
  3. 0 11
      .idea/modules.xml
  4. 0 6
      .idea/vcs.xml
  5. 0 16
      JavaSE/.idea/compiler.xml
  6. 1 3
      JavaSE/.idea/encodings.xml
  7. 0 20
      JavaSE/.idea/jarRepositories.xml
  8. 9 0
      JavaSE/.idea/libraries/java_maven_1_0_SNAPSHOT.xml
  9. 5 17
      JavaSE/.idea/misc.xml
  10. 9 0
      JavaSE/.idea/modules.xml
  11. 123 123
      JavaSE/.idea/uiDesigner.xml
  12. 4 3
      JavaSE/day01/src/HelloWorld.java
  13. 16 23
      JavaSE/day01/src/Test01.java
  14. 24 17
      JavaSE/day01/src/Test02.java
  15. 40 16
      JavaSE/day01/src/Test03.java
  16. 0 59
      JavaSE/day01/src/Test04.java
  17. 0 43
      JavaSE/day01/src/Test05.java
  18. 0 62
      JavaSE/day01/src/Test06.java
  19. 0 57
      JavaSE/day01/src/Test07.java
  20. 0 72
      JavaSE/day01/src/Test08.java
  21. 0 18
      JavaSE/day01/src/Test09.java
  22. 38 0
      JavaSE/day02/src/Exer01.java
  23. 114 0
      JavaSE/day02/src/Exer02.java
  24. 0 110
      JavaSE/day02/src/HomeWork.java
  25. 42 23
      JavaSE/day02/src/Test01.java
  26. 0 70
      JavaSE/day02/src/Test010.java
  27. 18 9
      JavaSE/day02/src/Test02.java
  28. 21 15
      JavaSE/day02/src/Test03.java
  29. 27 37
      JavaSE/day02/src/Test04.java
  30. 10 41
      JavaSE/day02/src/Test05.java
  31. 58 23
      JavaSE/day02/src/Test06.java
  32. 22 47
      JavaSE/day02/src/Test07.java
  33. 20 38
      JavaSE/day02/src/Test08.java
  34. 27 39
      JavaSE/day02/src/Test09.java
  35. 69 0
      JavaSE/day02/src/Test10.java
  36. 41 0
      JavaSE/day02/src/Test11.java
  37. 38 0
      JavaSE/day03/src/Exer01.java
  38. 31 0
      JavaSE/day03/src/Exer02.java
  39. 51 0
      JavaSE/day03/src/Exer03.java
  40. 96 0
      JavaSE/day03/src/Exer04.java
  41. 38 0
      JavaSE/day03/src/Exer05.java
  42. 46 0
      JavaSE/day03/src/Exer06.java
  43. 49 0
      JavaSE/day03/src/HomeWork.java
  44. 38 0
      JavaSE/day03/src/Test01.java
  45. 35 0
      JavaSE/day03/src/Test02.java
  46. 36 0
      JavaSE/day03/src/Test03.java
  47. 32 0
      JavaSE/day03/src/Test04.java
  48. 58 0
      JavaSE/day03/src/Test05.java
  49. 76 0
      JavaSE/day03/src/Test06.java
  50. 26 0
      JavaSE/day03/src/Test07.java
  51. 57 0
      JavaSE/day03/src/Test08.java
  52. 0 25
      JavaSE/day03/src/TestDIe13.java
  53. 0 29
      JavaSE/day03/src/TestDoWhile12.java
  54. 0 30
      JavaSE/day03/src/TestFor07.java
  55. 0 42
      JavaSE/day03/src/TestFor08.java
  56. 0 63
      JavaSE/day03/src/TestFor09.java
  57. 0 69
      JavaSE/day03/src/TestForFor14.java
  58. 0 56
      JavaSE/day03/src/TestForFor15.java
  59. 0 37
      JavaSE/day03/src/TestMath03.java
  60. 0 29
      JavaSE/day03/src/TestScanner01.java
  61. 0 48
      JavaSE/day03/src/TestScanner02.java
  62. 0 48
      JavaSE/day03/src/TestSwitch04.java
  63. 0 35
      JavaSE/day03/src/TestSwitch05.java
  64. 0 62
      JavaSE/day03/src/TestSwitch06.java
  65. 0 47
      JavaSE/day03/src/TestWhile10.java
  66. 0 48
      JavaSE/day03/src/TestWhile11.java
  67. 0 48
      JavaSE/day03/src/TestWhileBreak16.java
  68. 0 44
      JavaSE/day03/src/TestZhiShu17.java
  69. 0 29
      JavaSE/day03/src/Testbc15.java
  70. 10 8
      JavaSE/day04/day04.iml
  71. 0 16
      JavaSE/day04/pom.xml
  72. 49 0
      JavaSE/day04/src/com/lc/day04/arr03/Test05.java
  73. 29 0
      JavaSE/day04/src/com/lc/day04/arr04/Test01.java
  74. 63 0
      JavaSE/day04/src/com/lc/day04/arr05/Test01.java
  75. 30 0
      JavaSE/day04/src/com/lc/day04/arr05/Test02.java
  76. 35 0
      JavaSE/day04/src/com/lc/day04/arr06/Test01.java
  77. 23 0
      JavaSE/day04/src/com/lc/day04/arr07/Test01.java
  78. 39 0
      JavaSE/day04/src/com/lc/day04/bc01/Test01.java
  79. 62 0
      JavaSE/day04/src/com/lc/day04/bc02/Test02.java
  80. 66 0
      JavaSE/day04/src/com/lc/day04/bc02/Test03.java
  81. 27 0
      JavaSE/day04/src/com/lc/day04/bc02/Test04.java
  82. 52 0
      JavaSE/day04/src/com/lc/day04/exer01/Test01.java
  83. 76 0
      JavaSE/day04/src/com/lc/day04/exer01/Test02.java
  84. 34 0
      JavaSE/day04/src/com/lc/day04/exer01/Test03.java
  85. 42 0
      JavaSE/day04/src/com/lc/day04/exer01/Test04.java
  86. 95 0
      JavaSE/day04/src/com/lc/day04/exer02/Test01.java
  87. 91 0
      JavaSE/day04/src/com/lc/day04/exer02/Test02.java
  88. 178 0
      JavaSE/day04/src/com/lc/day04/exer02/Test03.java
  89. 0 55
      JavaSE/day04/src/main/java/com/sf/Day04.java
  90. 0 12
      JavaSE/day04/src/main/java/com/sf/Test1.java
  91. 0 41
      JavaSE/day04/src/main/java/com/sf/Test2.java
  92. 0 26
      JavaSE/day04/src/main/java/com/sf/Test3.java
  93. 0 21
      JavaSE/day04/src/main/java/com/sf/Test4.java
  94. 0 41
      JavaSE/day04/src/main/java/com/sf/Test5.java
  95. 0 21
      JavaSE/day04/src/main/java/com/sf/Test6.java
  96. 11 0
      JavaSE/day05/day05.iml
  97. 0 16
      JavaSE/day05/pom.xml
  98. 64 0
      JavaSE/day05/src/com/lc/day05/arr/TestArr01.java
  99. 59 0
      JavaSE/day05/src/com/lc/day05/arr/TestArr02.java
  100. 30 0
      JavaSE/day05/src/com/lc/day05/arr1/TestArr01.java

+ 0 - 8
.idea/.gitignore

@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml

+ 0 - 6
.idea/misc.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectRootManager">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-</project>

+ 0 - 11
.idea/modules.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/VIPQ.iml" filepath="$PROJECT_DIR$/.idea/VIPQ.iml" />
-      <module fileurl="file://$PROJECT_DIR$/JavaSE/day01/day01.iml" filepath="$PROJECT_DIR$/JavaSE/day01/day01.iml" />
-      <module fileurl="file://$PROJECT_DIR$/JavaSE/day02/day02.iml" filepath="$PROJECT_DIR$/JavaSE/day02/day02.iml" />
-      <module fileurl="file://$PROJECT_DIR$/JavaSE/day03/day03.iml" filepath="$PROJECT_DIR$/JavaSE/day03/day03.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

+ 0 - 16
JavaSE/.idea/compiler.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <annotationProcessing>
-      <profile name="Maven default annotation processors profile" enabled="true">
-        <sourceOutputDir name="target/generated-sources/annotations" />
-        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
-        <outputRelativeToContentRoot value="true" />
-        <module name="dayapi" />
-        <module name="day06" />
-        <module name="day05" />
-        <module name="day04" />
-      </profile>
-    </annotationProcessing>
-  </component>
-</project>

+ 1 - 3
JavaSE/.idea/encodings.xml

@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
-    <file url="file://$PROJECT_DIR$/dayapi/src/main/java" charset="UTF-8" />
-    <file url="file://$PROJECT_DIR$/dayapi/src/main/resources" charset="UTF-8" />
+  <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
     <file url="PROJECT" charset="UTF-8" />
   </component>
 </project>

+ 0 - 20
JavaSE/.idea/jarRepositories.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="RemoteRepositoriesConfiguration">
-    <remote-repository>
-      <option name="id" value="central" />
-      <option name="name" value="Central Repository" />
-      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
-    </remote-repository>
-    <remote-repository>
-      <option name="id" value="central" />
-      <option name="name" value="Maven Central repository" />
-      <option name="url" value="https://repo1.maven.org/maven2" />
-    </remote-repository>
-    <remote-repository>
-      <option name="id" value="jboss.community" />
-      <option name="name" value="JBoss Community repository" />
-      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
-    </remote-repository>
-  </component>
-</project>

+ 9 - 0
JavaSE/.idea/libraries/java_maven_1_0_SNAPSHOT.xml

@@ -0,0 +1,9 @@
+<component name="libraryTable">
+  <library name="java_maven-1.0-SNAPSHOT">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/day08/lib/java_maven-1.0-SNAPSHOT.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>

+ 5 - 17
JavaSE/.idea/misc.xml

@@ -1,18 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ExternalStorageConfigurationManager" enabled="true" />
-  <component name="MavenProjectsManager">
-    <option name="originalFiles">
-      <list>
-        <option value="$PROJECT_DIR$/day04/pom.xml" />
-        <option value="$PROJECT_DIR$/day05/pom.xml" />
-        <option value="$PROJECT_DIR$/day06/pom.xml" />
-        <option value="$PROJECT_DIR$/dayapi/pom.xml" />
-      </list>
-    </option>
-    <option name="workspaceImportForciblyTurnedOn" value="true" />
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
 </project>

+ 9 - 0
JavaSE/.idea/modules.xml

@@ -6,6 +6,15 @@
       <module fileurl="file://$PROJECT_DIR$/day01/day01.iml" filepath="$PROJECT_DIR$/day01/day01.iml" />
       <module fileurl="file://$PROJECT_DIR$/day02/day02.iml" filepath="$PROJECT_DIR$/day02/day02.iml" />
       <module fileurl="file://$PROJECT_DIR$/day03/day03.iml" filepath="$PROJECT_DIR$/day03/day03.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day04/day04.iml" filepath="$PROJECT_DIR$/day04/day04.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day05/day05.iml" filepath="$PROJECT_DIR$/day05/day05.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day06/day06.iml" filepath="$PROJECT_DIR$/day06/day06.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day07/day07.iml" filepath="$PROJECT_DIR$/day07/day07.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day08/day08.iml" filepath="$PROJECT_DIR$/day08/day08.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day09/day09.iml" filepath="$PROJECT_DIR$/day09/day09.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day10/day10.iml" filepath="$PROJECT_DIR$/day10/day10.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day11/day11.iml" filepath="$PROJECT_DIR$/day11/day11.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day12/day12.iml" filepath="$PROJECT_DIR$/day12/day12.iml" />
     </modules>
   </component>
 </project>

+ 123 - 123
JavaSE/.idea/uiDesigner.xml

@@ -1,124 +1,124 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Palette2">
-    <group name="Swing">
-      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
-      </item>
-      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
-        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
-        <initial-values>
-          <property name="text" value="Button" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="RadioButton" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="CheckBox" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="Label" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
-          <preferred-size width="-1" height="20" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
-      </item>
-    </group>
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
 </project>

+ 4 - 3
JavaSE/day01/src/HelloWorld.java

@@ -1,12 +1,13 @@
 /**
  * ClassName: HelloWorld
- *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:28
+ * @Create 2023/10/21 15:16
  * @Version 1.0
  */
 public class HelloWorld {
+    //生成主函数 psvm
     public static void main(String[] args) {
-        System.out.println("123456");
+        //输出 sout
+        System.out.println("Hello World");
     }
 }

+ 16 - 23
JavaSE/day01/src/Test01.java

@@ -2,33 +2,26 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
+ * @Create 2023/10/21 15:31
  * @Version 1.0
  */
 public class Test01 {
+    //单行
 
-    public static void main(String[] args) {
-        // 单行注释
-
-        /*
-        *  多行注释
-        */
-
-        /**
-         * 文档注释
-         * @param args
-         */
-
-        //类中:特殊含义的单词  关键字 :小写的  不能使用
-
-
-        //标识符
-        //在写代码过程中。 class 类名称 自定义 名称 : 标识符
-        //特点:
-        // 由 a-z A-Z 数字 0-9 $ _ 组成
-        // 数字不能开头
-        // 不能由空格
-        // 见名知意
+    /*
+        多行
+     */
 
+    /**
+     *  文档注释 后面
+     */
+    public static void main(String[] args) {
+        //小数   整数   字符串(文本)   布尔 (true false)  字符类型  字面量
+        System.out.println(1.111111);
+        System.out.println(1000);
+        System.out.println("helloworld");
+        System.out.println(true);
+        //System.out.println('中'); //单引号 自由一个字符
+        System.out.println('A');
     }
 }

+ 24 - 17
JavaSE/day01/src/Test02.java

@@ -2,33 +2,40 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
+ * @Create 2023/10/21 15:31
  * @Version 1.0
  */
 public class Test02 {
 
     public static void main(String[] args) {
-        //常量
+        //整数
+        byte a = 127; // 超出报错
 
-        //描述商品 手机
-        // 价格  小数 直接使用
-        // 数量  整数  1000
-        // 详细  文本 (字符串) 特点 "" 双引号包裹
-        System.out.println(12.99);
-        System.out.println(1000);
-        System.out.println("小米手机,很好用");
+        short b = 128;
 
-        //字符 特点 单引号
-        System.out.println('是');
+        int c  = 1234567891;
 
-        //布尔 只有两个值 true false
-        System.out.println(false);
+        long d = 12345678910L; //数值 取int long类型需要加 L
 
+        // 小数
+        float e = 1.1234567890F; // 加F
+        double f = 1.123456789987654321; // 可以加D
 
-        //拼接字符串 +
-        System.out.println("价格:"+12.99);
-        System.out.println("数量"+1000);
-        System.out.println("是否热销:"+false);
+        // char
+        char g = 'C'; //单引号
+
+        // boolean
+        boolean h = true;
+
+        //使用变量输出
+        System.out.println(a);
+        System.out.println(b);
+        System.out.println(c);
+        System.out.println(d);
+        System.out.println(e);
+        System.out.println(f);
+        System.out.println(g);
+        System.out.println(h);
 
     }
 }

+ 40 - 16
JavaSE/day01/src/Test03.java

@@ -2,33 +2,57 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
+ * @Create 2023/10/21 15:31
  * @Version 1.0
  */
 public class Test03 {
 
     public static void main(String[] args) {
-        //变量
-        // 个人信息
+       /*
+       变量的注意事项:
 
-        String name = "坤坤";
-        int age = 28;
-        double weight = 82.2;
-        boolean isMarry = false;
+        - 变量名不能重复
+        - 变量未赋值,不能使用
+        - 定义long类型变量,数据后面加L 不然默认是int类型
+        - 定义float类型变量,数据后面加F
+        */
 
-        char sex = '男';
-        //修改
-        name = "鸡哥";
-        //使用 变量名称
+//        int a = 10;
+//        int a = 20; //重复
+//
+//        int b;
+//        System.out.println(b); //未赋值
 
-        System.out.println("名称 :"+name);
-        System.out.println("年龄 :"+age);
-        System.out.println("体重 :"+weight);
-        System.out.println("婚姻 :"+isMarry);
-        System.out.println("性别 :"+sex);
+        //作用域 问题
+//        int b = 20;
+//        {
+//            int a =10;
+//            System.out.println(b);
+//        }
+//
+//        System.out.println(a);
 
+        // String // 引用数据类型
 
+        String a = "tom";
+        String b = "坤坤";
 
+        System.out.println(a);
+        System.out.println(b);
+
+
+        //变量使用
+        int a1 = 10;
+
+        a1 = 20;
+
+        //+-
+        int a2 = a1 + 20; //其他变量
+
+        a1 = a1 + 20; //赋值给自己
+
+        //直接输出
+        System.out.println(a1);
 
     }
 }

+ 0 - 59
JavaSE/day01/src/Test04.java

@@ -1,59 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test04 {
-
-    public static void main(String[] args) {
-        //变量
-        byte a = 10 , b = 20;
-
-        byte a1,a2; //声明不赋值
-
-        //System.out.println(a1 + 10); ;
-
-        //int a1 = 10;
-
-        {
-            int a3 = 20;
-        }
-
-        //System.out.println(a3); //不能使用
-        // 变量可以声明多个;
-        // 不赋值,不能使用
-        // 不可以重名
-        // 变量 范围(作用域问题)
-
-
-
-        //数据问题
-
-        byte b1 = 127; // 超出不可以
-
-        short b2 = 32767; //32768
-
-        int b3 = 123456789;  //使用最多的。
-
-        long b4 = 12345678910L; //加 L 推荐L 小写 和 1 影响
-
-        // 浮点
-        float b5 = 0.123456789F; // 加F  默认是 Double  单精度 小数点后 8位
-        System.out.println(b5);
-
-        double b6 = 0.11111111222222223333333;
-        System.out.println(b6);
-
-        //字符  单引号包裹
-        char b7 = '中';
-        System.out.println(b7);
-
-        //布尔
-        boolean b8 = true;
-        System.out.println(b8);
-
-
-    }
-}

+ 0 - 43
JavaSE/day01/src/Test05.java

@@ -1,43 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test05 {
-
-    public static void main(String[] args) {
-       //算数运算符
-
-        int a = 10;
-        int b = 20;
-
-        int c = a + b;
-
-        System.out.println(c);
-
-        double d1 = 0.1;
-        double d2 = 0.2;
-
-        System.out.println(d1+d2);
-        // 0.30000000000000004  由于精度问题
-
-        //乘法
-        int a1 = 20;
-        int a2 = 20;
-
-        System.out.println(a1 * a2);
-
-
-        // 除法
-        int a3 = 10 / 3; // 3
-        System.out.println(a3);
-
-        // 取余数
-
-        int a4 = 10 % 3;
-        System.out.println(a4);
-
-    }
-}

+ 0 - 62
JavaSE/day01/src/Test06.java

@@ -1,62 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test06 {
-
-    public static void main(String[] args) {
-        // + 连接
-        int a = 10;
-
-        System.out.println(a+"1"); // 101
-
-        //+ 连接 是和字符 相遇 没有遇到字符串 执行 + 法
-        System.out.println(1+2+a+"1"); // 两个两个执行
-
-        System.out.println("------------");
-        // ++ 自增
-
-        //单独使用  +1
-
-        int a1 = 10;
-
-        //++a1; //自增
-        a1++; //自增
-
-        System.out.println(a1);
-
-        System.out.println("-------------");
-        //参与 运算符
-        // 区分 前 + 和 后 +
-
-        int a2 = 10;
-
-        //int a3 = ++a2; // 先加1 赋值 a3 = 11;
-
-        //System.out.println("a3="+a3);
-
-        int a4 = a2++; // 先赋值 10 之后 + 1   a2 = 11
-        System.out.println("a4="+a4);
-        System.out.println("a2="+a2);
-
-
-        //练习
-
-        int x = 3;
-
-        //      3   + 5   * 5
-        int y = x++ + ++x * x++;
-
-        System.out.println("x="+x); // x = 6
-        System.out.println("y="+y); // y = 28
-
-        // 符号优先级  ++
-
-
-
-
-    }
-}

+ 0 - 57
JavaSE/day01/src/Test07.java

@@ -1,57 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test07 {
-
-    public static void main(String[] args) {
-        int a = 153;
-
-        int i = a % 10;
-        System.out.println(i);
-
-        int i1 = a / 10 % 10;
-        System.out.println(i1);
-
-        int i2 = a / 100;
-        System.out.println(i2);
-
-        int flag = 500000000;
-
-        int i3 = flag / 4200;
-        System.out.println("月:"+i3);
-
-        int i4 = flag % 4200  /120 ;
-        System.out.println("天:"+i4);
-
-
-
-
-        String str1 = "4";                       //判断对错:
-        String str2 = 3.5f + "";               //判断str2对错:
-        System.out.println(str2);              //输出: 3.5
-        System.out .println(3+4+"Hello!");     //输出:
-        System.out.println("Hello!"+3+4);      //输出:
-        System.out.println('a'+1+"Hello!");    //输出:字符本质数字 自动转换
-        System.out.println("Hello"+'a'+1);     //输出:
-
-
-        int x = 1;
-        int k = x++ + ++x * x++;
-        System.out.println("k = " + k); //? 10
-        System.out.println("x = " + x); //? 4
-
-        int d = 2;
-        int j = d++;
-        System.out.println(j);
-
-        int m = 2;
-        m = m++;
-        //(1)先取m的值“2”放操作数栈 (2)m再自增,m=3 (3)再把操作数栈中的"2"赋值给m,m=2
-        System.out.println(m);
-
-    }
-}

+ 0 - 72
JavaSE/day01/src/Test08.java

@@ -1,72 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test08 {
-
-    public static void main(String[] args) {
-        //自动转换
-        byte a1 = 10;
-
-        int a2 =  a1;
-
-        int a3 = a1 + 20;
-        System.out.println(a3);
-
-
-        double d1 = a2;
-        System.out.println(d1);
-
-
-        //char short byte 不能转换 可以提示类型
-        //通过接收
-
-        byte b1 = 10;
-        byte b2 = 10;
-        //byte b3 = b1+b2; //b1
-
-        byte b4 = 10 + 10; // 常量优化
-        //byte b5 = 10 + b1; // 变量 b1取值
-
-        int b6 = b1+b2;
-
-
-        System.out.println("----------------------------");
-
-        int x = 257;
-
-        //数据类型 名称 = (小数据类型) 值
-        byte y = (byte) x;
-
-        // 0000 0001 0000 0001 = 257
-        // 截取
-        // 0000 0001  = 1
-
-        System.out.println(y); // 损失精度
-
-        int x1 = 128;
-        // 0000 0000 1000 0000 = 128
-        byte x2 = (byte) x1;
-        // 1000 0000
-        System.out.println(x2);//-128  自学 -128 ? 数字 源码 反码  补码
-
-
-        System.out.println("--------------");
-
-        char a = '中';
-        char b = '国';
-
-        System.out.println(a+0); // 提升 int  返回 Ascii值
-        System.out.println(b+0);
-
-        // 20013
-        // 22269
-
-        // int char
-        System.out.println((char)20013 );
-        System.out.println((char)22269 );
-    }
-}

+ 0 - 18
JavaSE/day01/src/Test09.java

@@ -1,18 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/16 11:39
- * @Version 1.0
- */
-public class Test09 {
-
-    public static void main(String[] args) {
-       // int
-        int a = 1234567;
-
-        byte b = (byte) a;
-
-        System.out.println(b);
-    }
-}

+ 38 - 0
JavaSE/day02/src/Exer01.java

@@ -0,0 +1,38 @@
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/10/28 9:27
+ * @Version 1.0
+ */
+public class Exer01 {
+
+
+    public static void main(String[] args) {
+        /*
+        1. 定义变量a 判断是否时偶数,输出boolean值
+        2. 定义变量b是否能被7整除,输出boolean值
+        3. 将变量a进行++操作,在判断是否时偶数并且能否被7整除,输出boolean值
+        4. 输出a的值
+         */
+
+        int a =102;
+
+        boolean odd = (a % 10 == 0);
+
+        System.out.println("是否是偶数:"+odd);
+
+        System.out.println("是否是偶数"+(a % 10 == 0));
+
+        int b = 107;
+
+        System.out.println("能否被7整除:"+(b % 7 == 0));
+
+        a++;
+        System.out.println("能否被7整除:"+(a % 7 == 0));
+        System.out.println("a:"+a);
+
+
+    }
+    
+}

+ 114 - 0
JavaSE/day02/src/Exer02.java

@@ -0,0 +1,114 @@
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/10/28 9:27
+ * @Version 1.0
+ */
+public class Exer02 {
+
+
+    public static void main(String[] args) {
+        /*
+       定义变量 分数.
+       分数小于300 当保安。大于400上本科,  大于500 一本 大于 600 上985院校 .
+         */
+        int s = 501;
+
+        if (s >= 0 && s <= 750){
+            if (s <= 300){
+                System.out.println("当保安");
+            }else if (s >= 400 && s < 500){
+                System.out.println("上本科");
+            }else if (s >= 500 && s < 600){
+                System.out.println("一本");
+            }else if (s >= 600){
+                System.out.println("上985院校");
+            }
+        }
+
+
+
+        //分数 0 - 750
+        //嵌套
+
+
+
+
+        /*
+        定义月份变量. 月份在1-3输出春季,后面省略 ,可用嵌套保证程序的健壮性.
+         */
+
+        int m = 4;
+
+        if (m >= 1 && m <= 12){
+            if ( m ==1 || m == 2 || m == 3 ){
+                System.out.println("春天");
+            }else if ( m ==4 || m == 5 || m == 6 ){
+                System.out.println("夏天");
+            }else if ( m ==7 || m == 8 || m == 9 ){
+                System.out.println("秋天");
+            }else if ( m ==10 || m == 11 || m == 12 ){
+                System.out.println("冬天");
+            }
+        }
+
+
+        //定义三个整数变量. 按顺序输出 变量的大小.从小到大.
+        int a = 20;
+        int b = 15;
+        int c = 18;
+
+        //交换
+        if (a > b){
+            //临时变量
+            int temp = a;
+            a = b;
+            b = temp;
+        }
+
+        if (b > c){
+            //临时变量
+            int temp = b;
+            b = c;
+            c = temp;
+        }
+
+        if (a > b){
+            //临时变量
+            int temp = a;
+            a = b;
+            b = temp;
+        }
+
+        System.out.println(a +" < "+ b + " < "+ c );
+
+
+        int a1 = 10;
+        int a2 = 40;
+        int a3 = 30;
+
+        if (a1 > a2){
+            if (a2 > a3){
+                System.out.println( a1 + ">" +a2 + ">"+ a3 );
+            }else{
+                if (a1 > a3){
+                    System.out.println( a1 + ">" +a3 + ">"+ a2 );
+                }else{
+                    System.out.println( a3 + ">" +a1 + ">"+ a2 );
+                }
+            }
+        }else{
+            //a2
+            if (a1 > a3){ //
+                System.out.println( a2 + ">" +a1 + ">"+ a3 );
+            }else{ // a3
+                if ( a2 > a3 ){
+                    System.out.println( a2 + ">" +a3 + ">"+ a1 );
+                }else{
+                    System.out.println( a3 + ">" +a2 + ">"+ a1 );
+                }
+            }
+        }
+    }
+}

+ 0 - 110
JavaSE/day02/src/HomeWork.java

@@ -1,110 +0,0 @@
-/**
- * ClassName: HomeWork
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 16:24
- * @Version 1.0
- */
-public class HomeWork {
-
-    public static void main(String[] args) {
-        int year = 2001;
-        int month = 2;
-        int days = 28;
-
-        if (year >= 0){
-            if (month >= 1 && month <= 12){
-                //标识 每月天数最大值
-                int maxDay;
-
-                if ( month == 4 || month == 6 || month == 9 || month == 11 ){
-                    //day 最大值 范围  0 - 30
-                    maxDay = 30;
-                } else if ( month == 2 ){
-                    //day 最大值 范围  0 - 28 29
-                    maxDay = 28;
-                    if ( year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
-                        maxDay++;
-                    }
-                } else {
-                    //day 最大值 范围  0 - 31
-                    maxDay = 31;
-                }
-
-                if (days >= 0 &&  days <= maxDay){
-                    //符合
-                    System.out.println(year+"年"+month+"月"+days+"日");
-                }else{
-                    System.out.println("天数不符合");
-                }
-
-            }else {
-                System.out.println("月份不符合");
-            }
-        }else {
-            System.out.println("年分不符合");
-        }
-    }
-
-    /*
-    x = 40 y = 20  z = 30;
-
-    定义三个整数变量. 按顺序输出 变量的大小.从小到大. 输入 xyz 的值。
-
-    输出值
-    x:10  > y :20 > z: 30;
-    y:20 > z:30 > x:40
-
-     */
-    public static void main2(String[] args) {
-        int num1 = 40;
-        int num2 = 60;
-        int num3 = 30;
-
-        if ( num1 > num2 ){
-            int temp = num1;
-            num1 = num2;
-            num2 = temp;
-        }
-        if ( num2 > num3 ){
-            int temp = num2;
-            num2 = num3;
-            num3 = temp;
-        }
-        if ( num1 > num2 ){
-            int temp = num1;
-            num1 = num2;
-            num2 = temp;
-        }
-        System.out.println("num1:"+ num1 + "> num2 :"+num2 +" > num3 :"+num3);
-
-    }
-
-    /*
-    定义两个变量 a 和 b。
-
-    如果 a > b 交换  a 和 b 的值。 输出 a 和 b
-     */
-
-    public static void main1(String[] args) {
-        int a = 30;
-        int b = 20;
-
-        System.out.println("a:"+a);
-        System.out.println("b:"+b);
-
-        if (a > b){
-            // 交换  临时变量
-            int temp = a;
-            a = b;
-            b = temp;
-
-        }
-
-        System.out.println("a:"+a);
-        System.out.println("b:"+b);
-    }
-
-
-
-}

+ 42 - 23
JavaSE/day02/src/Test01.java

@@ -2,50 +2,69 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test01 {
 
+    /*
+         +  -  *  /  %
+     */
     public static void main(String[] args) {
-        //赋值运算符
-        int a = 10;
+        // +
+        int a = 10 + 20;
 
-        a += 20;
+        int b = a + 20;
+        System.out.println(b);
 
-        // *=  /= 原理相同
+        // *
+        double d = 0.1 * 0.3;
 
-        System.out.println("a:"+a);
+        System.out.println(d);
+        // / 整除
+        int i = 10 / 3;
+        System.out.println(i);
 
+        // % 模
+        int i1 = 10 % 3;
+        int i2 = -10 % 3;
+        int i3 = 10 % -3;
+        System.out.println(i1);
+        System.out.println(i2);
+        System.out.println(i3);
 
+        int a1 = 153;
 
-        //考虑 溢出问题
+        int g = a1 % 10;
+        int s = a1 / 10 % 10;
+        int b1 = a1 / 100;
 
-        byte b = 120;
+        System.out.println("个:"+g);
+        System.out.println("十:"+s);
+        System.out.println("百:"+b1);
 
-        b += 10; // 原理  用的强制转换  b = (byte)(b+10)
-
-        System.out.println("b:"+b);
-
-
-        // 面试题
 
+        //练习
         /*
-        short s = 10;
+        马晕一天能赚5个亿左右,就是5个小目标,假如普通人一天可以赚120元,
+        一个月赚4200元,那么想赚够马晕一天的收益,需要多少个月零几天?
 
-        s =  s + 10;
-
-        s += 10; 区别?
+        先算出 月份  再算天数
+        分析:
+        月份 = 5个亿  /  4200;
+        天数 =   5个亿  %  4200  / 120;
          */
 
-        short s = 10;
-        // s =  s + 10; // byte short char 之间不能转换。
-        // s short类型 和 10 类型 int  结果 只能是 int。
+        int c = 500000000;
+        int m = 4200;
+        int day = 120;
 
-        s += 10; // 么有问题  使用 += 强转转换。
+        //月份
+        System.out.println( "月"+ (c / m));
+        //天数
+        System.out.println( "天"+ (c % m / day));
     }
 
 
 
-
 }

+ 0 - 70
JavaSE/day02/src/Test010.java

@@ -1,70 +0,0 @@
-/**
- * ClassName: Test01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
- * @Version 1.0
- */
-public class Test010 {
-
-    public static void main(String[] args) {
-        //if
-        // 可以省略 {} 后的第一条语句当作执行体
-        // 注意 ; 代表结束
-
-        if (false)
-            System.out.println("true");
-
-        if(false)
-            System.out.println("true");
-        else
-            System.out.println("false");
-
-        // 缩进格式  不推荐使用
-
-
-        //嵌套问题
-        // 分数  5级
-
-        // 90 以上  优秀
-        // 80 以上 良好
-        // 70 中
-        // 60 及格
-        // 60 一下不及格
-
-        // 120   -10  增加 if语句 分数有 0 - 100
-        int s = 120;
-
-        //嵌套
-        /*
-            if(){
-                if(){
-                    嵌套
-                }
-            }
-         */
-
-        if ( s >= 0 && s <= 100 ){
-            if( s >= 90 ){
-                System.out.println("优秀");
-            }else if ( s >= 80 ){
-                System.out.println("良好");
-            }else if ( s >= 70 ){
-                System.out.println("中");
-            }else if ( s >= 60 ){
-                System.out.println("及格");
-            }else if ( s < 60 ){
-                System.out.println("不及格");
-            }
-        }else{
-            System.out.println("分数不符合");
-        }
-
-
-
-    }
-
-
-
-
-}

+ 18 - 9
JavaSE/day02/src/Test02.java

@@ -2,23 +2,32 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test02 {
 
+    /*
+        + 号特殊用法
+     */
     public static void main(String[] args) {
-        int a = 20;
-        int b = 30;
+        byte a1 = 10;
+        byte a2 = 10;
 
-        // 筛选条件
-        // 返回  boolean
-        System.out.println( a == b  );
-        System.out.println( a >= b  );
-        System.out.println( a <= b  );
+        //byte a3 = a1 + a2;  // ( 编译 )
 
-    }
+        //byte a4 = a1 + 10;  // ( 编译 )
+
+        //byte a5 = 10 + 10;    //  不报错
 
+        // + 可以连接字符窜
+        System.out.println(a1+"2"); // 连接
+        //整数 a1+1 相同类型 先做 + 法 之后做连接
+        System.out.println(a1+1+"2"+a2); // 11210
+        //两两 运算 前后顺序
+        System.out.println(a1+1+"2"+a2+10); // 1121010
+
+    }
 
 
 

+ 21 - 15
JavaSE/day02/src/Test03.java

@@ -2,32 +2,38 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test03 {
 
+    /*
+        + 号特殊用法
+            ++ 自增 : 自身 + 1
+                前++ :单独形成一行,没有任何影响
+                     : 参与运算 : 前++ 先自身加1. 再运算
+                后++ :单独形成一行,没有任何影响
+                     : 参与运算 : 先获取值 进行运算, 运算之后在+1
+        - 号
+            -- 自减 : 自身 -1
+     */
     public static void main(String[] args) {
+        int a1 = 10;
+        //a1++;
+        ++a1;
+        System.out.println(a1);
 
-        // 逻辑运算符
-        System.out.println( 3 == 4 & 4==4  );  // F
-        System.out.println( 3 == 4 | 4==4   ); // T
-        System.out.println( 3 == 4 ^ 4==4   ); // T
-        System.out.println( !(3 == 4)   ); // T
+        int a2 = 20;
 
+        //int a3 = a2++ +10;  // 30 在取20的值 做运算 20 + 10 = 30
+        int a4 = ++a2 +10;    // 31 先加1  a2 = 21 在和 10 相加 = 31
 
-        // 短路
-        int x = 1;
-
-        //System.out.println( 1==2 && ++x == 2 ); // 短路
-        System.out.println( 1==2 & ++x == 2 ); // x = 2
-
-        System.out.println("x:"+x);
-
+        //System.out.println(a3);
+        System.out.println(a4);
 
+        System.out.println(a2);
     }
 
 
 
-
 }

+ 27 - 37
JavaSE/day02/src/Test04.java

@@ -2,48 +2,38 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test04 {
 
-    public static void main(String[] args) {
-        //1. 定义变量a 判断是否时偶数,输出boolean值
-        //2. 定义变量b是否能被7整除,输出boolean值
-        //3. 将变量a进行++操作,在判断是否时偶数并且能否被7整除,输出boolean值
-        //4. 输出a的值
-
-
-        int a = 22;
-        boolean b = a % 2 == 0;
-        System.out.println( "是否是偶数 "+ b );
-
-        int c = 21;
-        System.out.println("boolean "+ (c % 7 == 0) );
-
-        a++;
-        System.out.println("boolean "+ (a % 7 == 0) );
-
-        System.out.println(a);
-
-
-        System.out.println("--------------");
-
-        //给定一个年份,判断是否是闰年。返回 true false
-        //
-        //闰年的判断标准是:
-        //1)可以被4整除,但不可被100整除
-        //2)可以被400整除
-
-        int year = 2020;
-        // 比较 逻辑 结果  boolean 选择boolean接收
-        boolean b1 = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
-
-        System.out.println("是否是闰年:"+b1);
 
+    public static void main(String[] args) {
+        //String str1 = 4;                       //判断对错:
+        String str2 = 3.5F + "";               //判断str2对错:
+        System.out.println(str2);              //输出:
+        System.out .println(3+4+"Hello!");     //输出:
+        System.out.println("Hello!"+3+4);      //输出:
+        System.out.println('a'+1+"Hello!");    //输出:数据类型转换
+        System.out.println("Hello"+'a'+1);     //输出:
+
+        //分析
+//        int i = 1;  // 2  3  4
+//        //      1   +   3 * 3
+//        int k = i++ + ++i * i++;
+//        System.out.println("k = " + k); //? 10
+//        System.out.println("i = " + i); //? 4
+
+
+        int i = 2;
+        int j = i++;
+        System.out.println(j); // 2
+        System.out.println(i); // 3
+
+        int m = 2;
+        m = m++;   //
+        //(1)先取m的值“2”放操作数栈 (2)m再自增,m=3 (3)再把操作数栈中的"2"赋值给m,m=2
+        System.out.println(m);
     }
 
-
-
-
 }

+ 10 - 41
JavaSE/day02/src/Test05.java

@@ -2,57 +2,26 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test05 {
 
-    public static void main(String[] args) {
-        //格式
-        // 分数 及格 60  奖励   小鹏汽车  不及格  奖励 皮鞭
-        int s = 59;
-
-        //                      true        false
-        String str =  (s > 60) ? "小鹏汽车" : "皮鞭";
-
-        System.out.println(str);
-
-
-        //
-        System.out.println("----------------");
-        int year = 2000;
-        boolean b = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
-
-        String s1 = b ? "是" : "否";
-
-        System.out.println(s1);
-
-        String s2 = (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) ? "是" : "否";
-        System.out.println(s2);
-
-
-
-        //获取两个数中比较大的值.
-        int a1 = 30;
-        int b2 = 40;
-
-        //a1 > b2
-        int i = (a1 > b2) ? a1 : b2;
-
-        System.out.println(i);
 
+    public static void main(String[] args) {
+        // +=
 
-        //数据兼容
-        double d1 = true ? 2 : 1.0;
+        int a = 10;
 
-        System.out.println(d1); // 2.0 double
+        a+=20; // a = a + 20;
 
+        System.out.println(a);
 
+        int b = 10;
 
+        b %= 3; // b = b % 3;
 
+        System.out.println(b);
     }
-
-
-
-
+    
 }

+ 58 - 23
JavaSE/day02/src/Test06.java

@@ -2,46 +2,81 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test06 {
 
+
     public static void main(String[] args) {
-        //获取三个数中的最大值
-        int a = 10;
-        int b = 11;
-        int c = 12;
+        // 自动转换
+        byte a1 = 10;
 
-        // a 和 b 比较
-        int max = a > b ? a : b;
+        //int 接收
+        int a2 = a1;
 
-        // c 比较
-        max = max > c ? max : c;
+        // + a1 byte 10 int
+        /*
+                                              0000 1010
+                0000 0000 0000 0000 0000 0000 0000 1010
+         */
+        int a3 = a1 + 10;
 
-        System.out.println(max);
+        // byte short char 都转成int
+        byte a4 = 10;
+        byte a5 = 10;
+        short a6 = 10;
+        char a7 = 'a'; //a7 码表
 
-        System.out.println("-------------");
-        //今天是周3,100天以后是周几?
+        //short i = a4 + a5;
+        int a8 = a7 + 1; // a = 码表 值 a = 97  98
+        System.out.println(a8);
 
-        int week = 7;
-        int days = 200;
+        int a10 = 120 ;
+        double a11 = a10;
 
-        int num = days % week ;
-        System.out.println(num);
 
-        int i = num + 3;
+        //强制转换 : 损失精度。
+        int i1 = 128;
 
-        System.out.println("星期"+i % 7);
+        byte i2 = (byte) i1;
+        System.out.println(i2); //-128
+        // 底层存储
+        // 0000 0000 1000 0000  int
+        // 1000 0000 byte 1000 0000 = -128
 
-        //简单
-        int i1 = days + 3;
+        int i3 = 12345;
+        byte i4 = (byte) i3;
+        System.out.println(i4); // 57
 
-        //String s = (i1 % week == 0) ? "日" : (i1 % week) + "";
-        System.out.println("星期"+ ((i1 % week == 0) ? "日" : (i1 % week) + "") );
-    }
+        // 0011 0000 0011 1001
+        //           0011 1001
+
+
+        /*
+            short s = 10
+            s = s + 2;和  s += 2  区别
+
+         */
 
+        short s = 10;
+        //s = s + 2; // 编译不通过  2 常量 常量默认是 int  结果 是 int
 
+        s += 2; // 编译通过  2 常量  += 运算符 本质是强制转换
+        //s = (short) (s+2);
 
+        int b1 = 10;
+        double b2 = b1;
 
+        double b3 = 10;
+        System.out.println(b2);
+        System.out.println(b3);
+
+        char c = 'a'; // 本质 是 97 代表 a
+
+        byte b4 = 100; //常量优化
+        // byte b5 = 128; //常量优化
+
+    }
+    
 }

+ 22 - 47
JavaSE/day02/src/Test07.java

@@ -2,64 +2,39 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test07 {
 
-    public static void main(String[] args) {
-        //  位运算符
-        System.out.println(7 & 2); // 2
-        /*
-                0000 0111
-                0000 0010
-                ----------
-                0000 0010   2
-         */
-        System.out.println(7 | 2); // 7
-          /*
-                0000 0111
-                0000 0010
-                ----------
-                0000 0111  7
-         */
-        System.out.println(7 ^ 2); // 5
-          /*
-                0000 0111
-                0000 0010
-                ----------
-                0000 0101  5
-         */
-        System.out.println(7 >> 2); //  1
-        System.out.println(-7 >> 2); // -2
-        /*
-            0000 0111
 
-            右移动 2
-            00 0000 01
+    public static void main(String[] args) {
 
-            1000 0111
-         */
-        System.out.println(7 << 2); // 28
+        //int
+        int a1 = 10;
+        int a2 = 20;
+        boolean b1 = (a1 == a2);
+        System.out.println(b1);
 
-        /*
-            0000 0111
-            0001 1100
-         */
-        System.out.println(-7 >>> 2); //
+        System.out.println(4 != 3);
 
+        int i1 = 10;
+        int i2 = 20;
+        System.out.println(i1 == i2);//false
+        System.out.println(i1 != i2);//true
+        System.out.println(i1 >= i2);//false
 
-        System.out.println(~7); // 取反
 
-        /*
-            0000 0111
+        int m = 10;
+        int n = 20;
+        System.out.println(m == n);//false
+        System.out.println(m = n);//20 // 赋值
 
-            1111 1000
+        boolean b3 = false;
+        boolean b2 = true;
+        System.out.println(b1 == b2);//false
+        System.out.println(b1 = b2);//true
 
-         */
     }
-
-
-
-
+    
 }

+ 20 - 38
JavaSE/day02/src/Test08.java

@@ -2,58 +2,40 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test08 {
 
-    public static void main(String[] args) {
-        int s = 59;
-
-        //及格60
-        if ( s > 60 ){
-            System.out.println("成绩合格");
-        }
-
-        // 岔路口
-        // 根据 条件 选择
-
 
+    public static void main(String[] args) {
 
-        //if 语句
-        //根据年龄判断  是否是成年人。
-        int age = 17;
+        System.out.println(3==3 & 3!=4); //T & T T
 
-        if ( age >= 18 ){
-            System.out.println("是成年人");
-        }else {
-            System.out.println("不是成年人,不能上网");
-        }
+        int i=1;
+//        System.out.println(1 == 1 & i++ == 2 ); // F
+//        System.out.println(i); // 2
+//        System.out.println(2 == 1 & i++ == 2 ); // F
+//        System.out.println(i ); // i++ 运行
 
+        //&& 短路
+//        System.out.println(2 == 1 && i++ == 2 ); // 前面2 == 1返回 F 后面不执行
+//        System.out.println(i ); // i++ 不运行
 
-        System.out.println("--------------");
-        //红路灯
+        // ||
+//        System.out.println(1 == 1 || i++ == 2 ); // 前面1 == 1返回 T 后面不执行
+//        System.out.println(i ); // i++ 不运行
 
-        //红灯  停止   绿灯  通行    黄灯  注意
+        System.out.println(1 == 1 | i++ == 2 ); // 前面1 == 1返回 T 后面执行
+        System.out.println(i ); // i++ 运行
 
-        char light = '黑';
+        //用  双 && 双 ||
 
-        if (light == '红'){
-            System.out.println("红灯 停止");
-        } else if (light == '绿'){
-            System.out.println("绿灯 通行");
-        } else if (light == '黄'){
-            System.out.println("黄灯 注意");
-        } else {
-            //代码
-            System.out.println("不存在的颜色");
-        }
+        System.out.println(1==1 ^ 1==2);
+        System.out.println(1==1 ^ 2==2);
 
 
 
     }
-
-
-
-
+    
 }

+ 27 - 39
JavaSE/day02/src/Test09.java

@@ -2,62 +2,50 @@
  * ClassName: Test01
  *
  * @Author 爱扣钉-陈晨
- * @Create 2023/11/17 9:33
+ * @Create 2023/10/28 9:27
  * @Version 1.0
  */
 public class Test09 {
 
+
     public static void main(String[] args) {
-//        int x = 2;
-//        int y = 2;
-//        if(x++ == 2 & ++y == 2){
-//            x = 17;
-//        }
-//        System.out.println("x=" + x + ",y=" + y);  //x 3  y 3
 
+        //状态
+        boolean isRed = true;
 
+        //判断 是红  返回停止  不是 返回通行
+        String result = ( isRed  ) ? "停止" : "通行";
 
-//        int x = 11,y = 11;
-//        if(x++ == 12 && ++y == 12){
-//            x =71;
-//        }
-//        System.out.println("x="+x+",y="+y);  // x 12  y  11
 
+        System.out.println(result);
+        //注意: 值1 和 值2 必须兼容。
+        //      三元运算符 必须有结果赋值。
 
-//        boolean x = true;
-//        boolean y = false;
-//        short z = 27;
-//        if ((z++ == 27) && (y = true)) {
-//            z++;
-//        }
-//        if ((x = false) || (++z == 30)) {
-//            z++;
-//        }
-//        System.out.println("z=" + z); // z ?  31
+        //比较两个数的大小 返回大的数字
+        int a1 = 20;
+        byte a2 = 30;
 
+        int a3 = ( a1 > a2 ) ? a1 : a2;
 
-        /*
-        定义一个字符,判断它是字母还是数字,还是其他字符
-        ​	数字范围:'0'-'9'
-        ​	字母范围:'A'-'Z','a'-'z'
-         */
+        System.out.println(a3);
 
 
-        char a = '中';
+        //获取三个数中的最大值
+        int i1 = 40;
+        int i2 = 20;
+        int i3 = 30;
 
-        if ( a > '0' && a < '9' ){
-            System.out.println("数字字符");
-        } else if ( a >= 'A' &&  a <= 'Z' || a >= 'a' &&  a <= 'z' ){
-            System.out.println("英文字符");
-        } else {
-            System.out.println("其他字符");
-        }
+        //两个两个比较
+        int max = i1 > i2 ? i1 : i2;
 
+        // 比较 i3
+        max = max > i3 ? max : i3;
 
+        System.out.println(max);
 
+        //不推荐
+        int i = (i1 > i2 ? i1 : i2) > i3 ? (i1 > i2 ? i1 : i2) : i3;
+        System.out.println(i);
     }
-
-
-
-
+    
 }

+ 69 - 0
JavaSE/day02/src/Test10.java

@@ -0,0 +1,69 @@
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/10/28 9:27
+ * @Version 1.0
+ */
+public class Test10 {
+
+    /*
+        if语句
+
+        2023.8.24是小日本子核废水排污的日子,这一天终将被历史铭记.
+        需求:定义时间20230824 如果等于此刻 投放核弹 炸死小日本.
+
+        String
+        int
+
+
+        小日本最终的结局只有两个,被核弹消灭,被海洋淹没.但是需要形成一定的条件.
+        如果有战争小日本被核弹消灭,没有被海洋淹没.
+        需求:定义定义变量 war 如果是true 用核弹消灭小日本,否则被海水淹没.
+
+
+        小明公司出品干死小日本游戏,在游戏中对于杀死小日本人数,给出响应奖励.
+
+        - 杀死  10人以内, 奖励人民币100元.
+        - 杀死  10 - 100 人以内, 奖励华为手机一部.
+        - 杀死  100 - 1000 人以内, 奖励奇瑞汽车一台.
+        - 杀死  1000 - 10000 人以内, 奖励保时捷.
+
+     */
+    public static void main(String[] args) {
+        int date = 20230825;
+
+        if (date == 20230824){
+            System.out.println("投放核弹 炸死小日本");
+        }
+
+        //if else
+
+        boolean war = false;
+
+        if (war){
+            System.out.println("用核弹消灭小日本");
+        }else{
+            System.out.println("被海水淹没");
+        }
+
+        //if else if ... else
+        System.out.println("-----------------");
+
+        int persons = -1;
+
+        if ( persons > 0 && persons <=10 ){
+            System.out.println("奖励人民币100元.");
+        }else if (persons > 10 && persons <=100){
+            System.out.println("奖励华为手机一部.");
+        }else if (persons > 100 && persons <=1000){
+            System.out.println("汽车.");
+        }else if (persons > 1000 && persons <=10000){
+            System.out.println("奖励保时捷.");
+        }else{
+            System.out.println("没有对应的奖励");
+        }
+
+    }
+    
+}

+ 41 - 0
JavaSE/day02/src/Test11.java

@@ -0,0 +1,41 @@
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/10/28 9:27
+ * @Version 1.0
+ */
+public class Test11 {
+
+    public static void main(String[] args) {
+
+        if (false)
+            System.out.println("123");
+        // 将 if后面下一条执行语句 为执行体
+        // 省略必须有缩进
+        System.out.println("456");
+
+
+        if(true){};
+        //; 结尾
+        System.out.println("111");
+
+
+        int a1 = 10;
+        int a2 = 20;
+
+        int max;
+        if (a1> a2){
+            max = a1;
+            System.out.println("a1>a2");
+        }else{
+            max = a2;
+            System.out.println("a2>a1");
+        }
+
+        max = ( a1 > a2) ? a1 : a2;
+
+
+    }
+    
+}

+ 38 - 0
JavaSE/day03/src/Exer01.java

@@ -0,0 +1,38 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:19
+ * @Version 1.0
+ */
+/*
+大家都知道,如果想成为一名ikun,当然要提出一定的条件:是否中分:是; 背带裤:是; 篮球:是。
+
+如果这三个条件同时满足,则:“真爱粉”
+如果三个条件有为真的情况,则:“假ikun”
+如果三个条件都不满足,则:“小黑子!”
+ */
+public class Exer01 {
+    public static void main(String[] args) {
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("是否中分(1/0)");
+        int i = scanner.nextInt();
+
+        System.out.println("背带裤:(true/flase)");
+        boolean b = scanner.nextBoolean();
+
+        System.out.println("背带裤:是/否 ");
+        String s = scanner.next();
+
+        if ( i == 1 && b && s.equals("是") ){
+            System.out.println("真爱粉");
+        }else if (i == 1 || b || s.equals("是")){
+            System.out.println("假ikun");
+        }else if (i != 1 && !b && !s.equals("是")){
+            System.out.println("小黑子!");
+        }
+        
+    }
+}

+ 31 - 0
JavaSE/day03/src/Exer02.java

@@ -0,0 +1,31 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:19
+ * @Version 1.0
+ */
+/*
+输入学生年龄,如果大于18岁的,输出“成年人”。低于18岁的,输出“青少年”。
+ */
+public class Exer02 {
+    public static void main(String[] args) {
+
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入年龄");
+        int age = scanner.nextInt();
+
+        switch (age/18){
+            case 0:
+                System.out.println("青少年");
+                break;
+            case 1,2,3,4: //新语法
+                System.out.println("成年人");
+                break;
+
+        }
+
+    }
+}

+ 51 - 0
JavaSE/day03/src/Exer03.java

@@ -0,0 +1,51 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:19
+ * @Version 1.0
+ */
+/*
+从键盘上输入2023年的“month”和“day”,要求通过程序输出输入的日期为2023年的第几天。
+ */
+public class Exer03 {
+    public static void main(String[] args) {
+
+
+        int month = 2;
+        int day = 28;
+
+        int days = 0;
+
+        switch (month){
+            case 12:
+                days += 30;
+            case 11:
+                days += 31;
+            case 10:
+                days += 30;
+            case 9:
+                days += 31;
+            case 8:
+                days += 31;
+            case 7:
+                days += 30;
+            case 6:
+                days += 31;
+            case 5:
+                days += 30;
+            case 4:
+                days += 31;
+            case 3:
+                days += 28;
+            case 2:
+                days += 31;
+            case 1:
+                days+=day;
+
+        }
+        System.out.println(days);
+    }
+}

+ 96 - 0
JavaSE/day03/src/Exer04.java

@@ -0,0 +1,96 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: HomeWork
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 9:19
+ * @Version 1.0
+ */
+public class Exer04 {
+    /*
+    定义 年、月、日,要求年份必须是正整数,月份范围是[1,12],
+    日期也必须在本月总天数范围内,如果输入正确,输出“年-月-日”结果,否则提示输入错误。
+
+    从键盘上输入 year年的“month”和“day”,要求通过程序输出输入的日期为year年的第几天。 闰年
+
+     */
+    public static void main(String[] args) {
+
+        //键盘输入
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请入年份");
+        int year = scanner.nextInt();
+        System.out.println("请入月份");
+        int m = scanner.nextInt();
+        System.out.println("请入天数");
+        int day = scanner.nextInt();
+
+        int sum = 0;
+
+        if ( year > 0 ){
+            //月份范围是[1,12]
+            if ( m >= 1 && m <=12 ){
+                //日期也必须在本月总天数范围内
+                int days;
+                if (m == 1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12){
+                    days=31;
+                }else if ( m == 2 ){
+                    //闰年 判断
+                    if (year % 4== 0 && year%100 != 0 || year % 400 == 0){
+                        days= 29;
+                    }else {
+                        days =28;
+                    }
+                }else{
+                    // 4 6 9 11月
+                    days = 30;
+                }
+                //判断
+                if ( day >= 1 && day <= days){
+
+                    System.out.println(year+"年-"+m+"月-"+days+"日");
+
+                    switch (m){
+                        case 12:
+                            sum += 30;
+                        case 11:
+                            sum += 31;
+                        case 10:
+                            sum += 30;
+                        case 9:
+                            sum += 31;
+                        case 8:
+                            sum += 31;
+                        case 7:
+                            sum += 30;
+                        case 6:
+                            sum += 31;
+                        case 5:
+                            sum += 30;
+                        case 4:
+                            sum += 31;
+                        case 3:
+                            if ( year % 4== 0 && year%100 != 0 || year % 400 == 0  ){
+                                sum++;
+                            }
+                            sum += 28;
+                        case 2:
+                            sum += 31;
+                        case 1:
+                            sum+=day;
+
+                    }
+                    System.out.println(year+"年-"+m+"月-"+day+"日是第"+sum+"天");
+
+                }else{
+                    System.out.println("日期也必须在本月总天数范围内");
+                }
+            }else{
+                System.out.println("月份范围是[1,12]");
+            }
+        }else {
+            System.out.println("年份必须是正整数");
+        }
+    }
+}

+ 38 - 0
JavaSE/day03/src/Exer05.java

@@ -0,0 +1,38 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: HomeWork
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 9:19
+ * @Version 1.0
+ */
+public class Exer05 {
+    public static void main(String[] args) {
+        //判断1-100之间,有多少个7.
+
+        int count = 0;
+        for (int i = 1; i < 100; i++) {
+            if ( i % 10 == 7 ){
+                count++;
+            }
+            if ( i / 10 == 7 ){
+                count++;
+            }
+        }
+        System.out.println(count);
+
+
+        //输出一个三位数的水仙花数字.
+        for (int i = 100; i < 999 ; i++) {
+            //个位十位百位
+            int g = i % 10;
+            int s = i / 10 % 10;
+            int b = i / 100;
+
+            if (i == g*g*g + s*s*s + b*b*b){
+                System.out.println(i);
+            }
+        }
+    }
+}

+ 46 - 0
JavaSE/day03/src/Exer06.java

@@ -0,0 +1,46 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer06
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 16:12
+ * @Version 1.0
+ */
+public class Exer06 {
+
+    /*
+    练习:键盘输入一个数字.判断其是否是 素数( 素数只能被1-本身整除的数字 )
+    判断其是否是 素数
+
+    举例 7   13   17  19
+     7
+        2 3 4 5 6
+     */
+    public static void main(String[] args) {
+        Scanner scanner = new Scanner(System.in);
+
+        int num = scanner.nextInt();
+        //判断标识
+        boolean flag = true;
+
+        for (int i = 2; i < num; i++) {
+            //判断每一个 i
+            if ( num % i == 0){
+                //有一个i 可以被模开 不是素数 改变标识
+                flag = false;
+            }
+        }
+
+        //标识判断
+        if (flag){
+            System.out.println(num+"是一个素数");
+        }else {
+            System.out.println(num+"不是一个素数");
+        }
+
+
+    }
+
+
+}

+ 49 - 0
JavaSE/day03/src/HomeWork.java

@@ -0,0 +1,49 @@
+/**
+ * ClassName: HomeWork
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 9:19
+ * @Version 1.0
+ */
+public class HomeWork {
+    /*
+    定义 年、月、日,要求年份必须是正整数,月份范围是[1,12],
+    日期也必须在本月总天数范围内,如果输入正确,输出“年-月-日”结果,否则提示输入错误。
+     */
+    public static void main(String[] args) {
+        int year = 2001;
+        int m = 2;
+        int day = 29;
+
+        if ( year > 0 ){
+            //月份范围是[1,12]
+            if ( m >= 1 && m <=12 ){
+                //日期也必须在本月总天数范围内
+                int days;
+                if (m == 1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12){
+                    days=31;
+                }else if ( m == 2 ){
+                    //闰年 判断
+                    if (year % 4== 0 && year%100 != 0 || year % 400 == 0){
+                        days= 29;
+                    }else {
+                        days =28;
+                    }
+                }else{
+                    // 4  6 9 11月
+                    days = 30;
+                }
+                //判断
+                if ( day >= 1 && day <= days){
+                    System.out.println(year+"年-"+m+"月-"+days+"日");
+                }else{
+                    System.out.println("日期也必须在本月总天数范围内");
+                }
+            }else{
+                System.out.println("月份范围是[1,12]");
+            }
+        }else {
+            System.out.println("年份必须是正整数");
+        }
+    }
+}

+ 38 - 0
JavaSE/day03/src/Test01.java

@@ -0,0 +1,38 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Test01 键盘输入
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 9:44
+ * @Version 1.0
+ */
+public class Test01 {
+
+    public static void main(String[] args) {
+        //导入
+
+        //创建对象
+        // 类型  变量   =  new 构造方法(参数);
+        Scanner scanner = new Scanner(System.in);
+
+        //调用
+        System.out.println("请输入Int类型");
+        int i = scanner.nextInt();
+        //结果赋值给 i
+
+        System.out.println("输入的值:"+i);
+
+
+        System.out.println("请输入Double类型");
+        double d = scanner.nextDouble();
+        //结果赋值给 i
+
+        System.out.println("输入的值:"+ d);
+
+        System.out.println("请输入Boolean类型");
+        boolean b = scanner.nextBoolean();
+        System.out.println("输入的值:"+b);
+
+    }
+}

+ 35 - 0
JavaSE/day03/src/Test02.java

@@ -0,0 +1,35 @@
+/**
+ * ClassName: Test02
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:40
+ * @Version 1.0
+ */
+public class Test02 {
+    public static void main(String[] args) {
+        //随机数
+        double random = Math.random();
+        //0-1 小数数字
+        System.out.println(random);
+
+        //0 - 100
+        double v = random * 100;
+        System.out.println(v);
+
+        //转换
+        int i = (int) v;
+
+        System.out.println(i);
+
+        // 50 - 100
+
+        // 0-50  + 50 ;
+        int i1 = (int) (Math.random() * 50) + 50; // 0-49
+        System.out.println(i1);
+
+        // a - b;
+        // (int) (Math.random() * a - b) + a
+
+
+    }
+}

+ 36 - 0
JavaSE/day03/src/Test03.java

@@ -0,0 +1,36 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Switch语句
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:40
+ * @Version 1.0
+ */
+public class Test03 {
+    public static void main(String[] args) {
+
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入季节");
+        String next = scanner.next();
+
+        //switch
+        switch (next){
+            case "春":
+                System.out.println("春天,万物复苏");
+                break; //break 在switch 作用结束 switch语句
+            case "夏":
+                System.out.println("夏天,热热热热");
+                break;
+            case "秋":
+                System.out.println("夏天,丰收");
+                break;
+            case "冬天":
+                System.out.println("夏天,寒冷");
+                break;
+            default:
+                System.out.println("没这个季节");
+                //break;
+        }
+    }
+}

+ 32 - 0
JavaSE/day03/src/Test04.java

@@ -0,0 +1,32 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Switch语句 特点
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:40
+ * @Version 1.0
+ */
+public class Test04 {
+    public static void main(String[] args) {
+
+        char a = '4';
+
+        //switch
+        switch (a) {
+
+            case '1':
+                System.out.println("夏天,寒冷");
+
+            case '2':
+                System.out.println("夏天,寒冷");
+
+            case '3':
+                System.out.println("夏天,寒冷");
+
+            default:
+                System.out.println("默认");
+
+        }
+    }
+}

+ 58 - 0
JavaSE/day03/src/Test05.java

@@ -0,0 +1,58 @@
+/**
+ * ClassName: for 循环
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 10:40
+ * @Version 1.0
+ *
+ *
+ *
+ */
+public class Test05 {
+    public static void main(String[] args) {
+
+        //循环 加上 号码
+        for (
+                int i = 0 ;
+                i < 10 ;
+                i++ ){
+            System.out.println( "第"+(i+1)+"次输出hello world");
+            //System.out.println( "第"+(i++)+"次输出hello world");
+        }
+
+        //执行流程
+        /*
+            执行 初始化,
+
+            条件判断
+
+            执行 循环体
+
+            迭代   条件判断    循环体  迭代 判断 为 false 结束。
+         */
+
+
+        //案例2: 输出1-100的奇数数字.
+        for (int i = 1; i <= 100  ; i++){
+            if ( i % 2 != 0 ){
+                System.out.println(i);
+            }
+        }
+
+
+        //案例3: 算出1-100的偶数数字的总和.
+        int sum = 0;
+
+        for (int i = 1; i <= 100; i++) {
+
+            if (i % 2 ==0){
+                //和
+                sum +=i; // sum = sum + i;
+            }
+        }
+
+        System.out.println("和"+sum);
+
+
+    }
+}

+ 76 - 0
JavaSE/day03/src/Test06.java

@@ -0,0 +1,76 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Test06 while循环
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 15:24
+ * @Version 1.0
+ */
+public class Test06 {
+
+    public static void main(String[] args) {
+        //10 次helloworld
+
+        //初始化 1
+        int i = 0;
+        //判断 2
+        while ( i < 10 ){
+            //循环体 3
+            System.out.println((i+1)+"helloworld");
+            //迭代 4
+            i++;
+        }
+        // 1 2 3 4 2 3 4
+
+
+        // 案例1:
+        // 水井深12米,青蛙第一天跳1米,之后每天比前一天多跳0.2米.请问几天能跳出井.
+        double l = 12;
+        int days = 0;
+        double a = 1;
+
+        while (l > 0){
+            //迭代
+            l = l - a;
+
+            //迭代
+            a +=0.2;
+
+            //统计
+            ++days;
+        }
+
+        System.out.println(days);
+
+
+        /*
+        随机生成一个100以内的数,猜这个随机数是多少?
+        从键盘输入数,如果大了,提示大了;如果小了,提示小了;如果对了,就不再猜了,并统计一共猜了多少次。
+        提示:生成一个[a,b] 范围的随机数的方式:(int)(Math.random() * (b - a + 1) + a)
+         */
+
+        //对象
+        Scanner scanner = new Scanner(System.in);
+        //随机数
+        int random = (int) (Math.random()*100);
+        //输入数字
+        System.out.println("请输入1-100之间的数字");
+        int number = scanner.nextInt();
+
+        while ( random != number ){
+            if (number > random){
+                System.out.println("猜大了");
+            }
+
+            if (  number < random){
+                System.out.println("猜小了");
+            }
+            System.out.println("重新输入1-100之间的数字");
+            number = scanner.nextInt();
+        }
+
+        System.out.println("正确:"+number);
+
+    }
+}

+ 26 - 0
JavaSE/day03/src/Test07.java

@@ -0,0 +1,26 @@
+/**
+ * ClassName: Test07
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 16:25
+ * @Version 1.0
+ */
+public class Test07 {
+    /*
+    do while循环
+     */
+
+    public static void main(String[] args) {
+
+        int i = 0;
+        do {
+            System.out.println("hello world");
+            i++;
+        }while (false);
+
+        //无条件执行一次
+
+    }
+
+
+}

+ 57 - 0
JavaSE/day03/src/Test08.java

@@ -0,0 +1,57 @@
+/**
+ * ClassName: 循环嵌套
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/4 16:25
+ * @Version 1.0
+ */
+public class Test08 {
+
+
+    public static void main(String[] args) {
+
+        for (int i = 0; i < 5; i++) {
+            for (int k = 0; k < 5; k++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+        // i 行数
+        // k 列数
+
+        /*
+            *
+            * *
+            * * *
+            * * * *
+            * * * * *
+         */
+        for (int i = 1; i <= 5; i++) {
+            for (int j = 1; j <= i  ; j++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+
+        System.out.println("---------------------");
+        /*
+
+         * * * * *
+         * * * *
+         * * *
+         * *
+         *
+
+         */
+
+        for (int i = 1; i <= 5; i++) {
+            for (int j = 1; j <= 5 - (i - 1)  ; j++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+
+    }
+
+
+}

+ 0 - 25
JavaSE/day03/src/TestDIe13.java

@@ -1,25 +0,0 @@
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestDIe13 {
-
-     public static void main(String[] args) {
-         //条件 true
-//         while (true){
-//             System.out.println("123");
-//         }
-
-         // System.out.println("123");
-         //占用cpu过高。
-         // 死循环后 不能写任何代码 不能执行
-
-         for (;  ; ) {
-             System.out.println("1");
-         }
-
-     }
-}

+ 0 - 29
JavaSE/day03/src/TestDoWhile12.java

@@ -1,29 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestDoWhile12 {
-
-     public static void main(String[] args) {
-        /*
-        do while
-         */
-        int i = 0;
-
-        do {
-            System.out.println((i+1)+" hello");
-
-            //迭代
-            i++;
-        }while (false);
-
-        //do while 无条件执行循环体
-
-
-     }
-}

+ 0 - 30
JavaSE/day03/src/TestFor07.java

@@ -1,30 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestFor07 {
-
-     public static void main(String[] args) {
-         //for
-         // 编号
-         for (
-                 int i = 0;
-                 i < 10 ;
-                 i++ ){
-             System.out.println((i+1) + " hello");
-         }
-
-         //四要素
-         // int i = 0 初始化   起始值
-         // i < 10  条件判断   结束值
-         // i++ 迭代
-         // System.out.println((i+1) + " hello"); 执行体
-
-         // for 起始值 结束值 明确循环次数。
-     }
-}

+ 0 - 42
JavaSE/day03/src/TestFor08.java

@@ -1,42 +0,0 @@
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestFor08 {
-
-     public static void main(String[] args) {
-         //输出1-100的奇数数字.
-         //分析: 判断 是否奇数  对 2 取模。 判断
-         //       循环  1 - 100
-         for ( int i = 1 ;  i <= 100 ; i++){
-            if ( i % 2 != 0){
-                System.out.println("奇数:"+i);
-            }
-         }
-
-
-
-         //
-         System.out.println("---------------");
-
-         // 算出1-100的偶数数字的总和.
-         // 循环 1-100
-         // 判断
-         // 年月日 案例 标识 在 if 上面
-         // 有计数思想。
-
-         int sum = 0;
-
-         for ( int i = 1 ;  i <= 100 ; i++){
-             if ( i % 2 == 0){
-                sum+=i;
-             }
-         }
-
-         System.out.println("和:"+sum);
-
-     }
-}

+ 0 - 63
JavaSE/day03/src/TestFor09.java

@@ -1,63 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestFor09 {
-
-     public static void main(String[] args) {
-         //练习1:判断1-100之间,有多少个7.
-         int count = 0;
-
-         for (int i = 0; i < 100 ; i++) {
-             if ( i % 10 == 7 ){
-                count++;
-             }
-             if ( i / 10 == 7 ){
-                 count++;
-             }
-         }
-
-         System.out.println(count);
-
-         //练习2:输出一个三位数的水仙花数字.
-         for (int i = 100; i <  1000; i++) {
-             int g = i % 10;
-             int s = i % 100 / 10; // 153
-             int b = i / 100;
-
-             if (g*g*g + s*s*s + b*b*b == i ){
-                 System.out.println("水仙花:"+ i);
-             }
-         }
-
-
-         //练习3:键盘输入一个数字.判断其是否是 素数( 素数只能被1-100整除的数字 )
-         Scanner scanner = new Scanner(System.in);
-         System.out.println("请输入数字");
-         int num = scanner.nextInt();
-
-         // 11 % 2 - 10
-         // 标识  2 - 10  改变状态 标识
-         // 判断标识
-        boolean flag = true;
-
-         for (int i = 2; i < num; i++) {
-             if ( num % i  == 0 ){
-                 flag = false;
-             }
-         }
-
-         if (flag){
-             System.out.println("num :"+num + "是素数");
-         }else {
-             System.out.println("num :"+num + "不是素数");
-         }
-        
-
-     }
-}

+ 0 - 69
JavaSE/day03/src/TestForFor14.java

@@ -1,69 +0,0 @@
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestForFor14 {
-
-     public static void main(String[] args) {
-          //格式
-          //打印5行6个*
-          for (int i = 0; i < 5 ; i++) { //外层 控制行
-               for (int j = 0; j < 6; j++) { //内层  空列
-                    System.out.print(" *");
-               }
-               System.out.println();
-          }
-
-
-          //打印5行直角三角形
-          /*
-
-           *             第1行   打印 1               i = 0  j = 0
-           **            第2行   打印 2               i = 1  j = 1
-           ***           第3行   打印 3
-           ****
-           *****         第3行   打印 3 通过行 控制列
-
-           */
-
-          for (int i = 0; i < 5 ; i++) { //外层 控制行
-               for (int j = 0; j <= i; j++) { //内层  空列
-                    System.out.print(" *");
-               }
-               System.out.println();
-          }
-
-          /*
-             打印 倒 直角 三角形
-               * * * * *         第1行  打印 5    i = 0   j = 5
-               * * * *           第2行  打印 4    i = 1   j = 4
-               * * *             第3行  打印 3    i = 2   j = 3
-               * *               第4行  打印 2
-               *                 第5行  打印 1    i = 5   j = 0;
-           */
-          for (int i = 0; i < 5 ; i++) { //外层 控制行
-               for (int j = 0; j < 5 - i; j++) { //内层  空列
-                    System.out.print(" *");
-               }
-               System.out.println();
-          }
-
-
-          /*
-          九九乘法表
-           */
-
-          for (int i = 1; i < 10; i++) {
-               for (int k = 1; k <= i; k++) {
-                    System.out.print( i +"*"+k+ "="+ (i*k)+'\t');
-               }
-               System.out.println();
-          }
-
-
-
-     }
-}

+ 0 - 56
JavaSE/day03/src/TestForFor15.java

@@ -1,56 +0,0 @@
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestForFor15 {
-
-     public static void main(String[] args) {
-          //上半部分:正的等腰三角形
-          //5行
-          for(int i=1; i<=5; i++){
-               //(1)打印空格
-			/*
-			当i=1,打印4个空格,j=4,3,2,1	j>=i
-			当i=2,打印3个空格,j=4,3,2
-			当i=3,打印2个空格,j=4,3
-			当i=4,打印1个空格,j=4
-			当i=5,打印0个空格,j=4,让循环条件一次都不满足
-			*/
-               for(int j=4; j>=i; j--){
-                    System.out.print("  ");
-               }
-               //(2)打印*
-			/*
-			当i=1,打印1个,j=1					j<=2*i-1
-			当i=2,打印3个,j=1,2,3,
-			当i=3,打印5个,j=1,2,3,4,5
-			当i=4,打印7个,j=1,2,3,4,5,6,7
-			当i=5,打印9个,j=1,2,3,4,5,6,7,8,9
-			*/
-               for(int j=1; j<=2*i-1; j++){
-                    System.out.print("* ");
-               }
-               //(3)换行
-               System.out.println();
-          }
-
-
-
-          //*
-          // 公鸡只数的可能性
-          for (int gong = 0; gong <= 20 ;gong++ ) {
-               // 母鸡只数的可能性
-               for (int mu = 0; mu <= 33 ;mu++ ) {
-                    // 小鸡只数
-                    int xiao = 100 - gong - mu;
-                    // 进行条件的判断
-                    if ((xiao % 3 == 0) && (gong * 5 + mu * 3 + xiao / 3 == 100)) {
-                         System.out.println("公鸡有"+gong+"只,母鸡有"+mu+"只,小鸡有"+xiao+"只");
-                    }
-               }
-          }
-     }
-}

+ 0 - 37
JavaSE/day03/src/TestMath03.java

@@ -1,37 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestMath03 {
-
-    public static void main(String[] args) {
-        //类名.方法
-        // Math 数学工具类。
-
-        double random = Math.random();
-
-        System.out.println(random);
-
-        //改变
-        // 需求 生成 0-100)之间的随机数。
-        int i =  (int) (random * 100);
-        System.out.println(i);
-
-        //注意
-        // 不能堆 random单独转换
-
-        //50 - 100 生成
-        //先生成 0-50 加  50
-        int v = (int)(Math.random() * 50) + 50;
-        System.out.println(v);
-
-        //公式
-        // a - b 之间的值。
-        // ( Math.random() *  b - a ) + a;
-    }
-}

+ 0 - 29
JavaSE/day03/src/TestScanner01.java

@@ -1,29 +0,0 @@
-import java.util.Scanner; //导入
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestScanner01 {
-
-
-    //Scanner
-    public static void main(String[] args) {
-        //创建对象
-        Scanner scanner = new Scanner(System.in);
-
-        //使用方法
-        System.out.println("请入int类型数据");
-        // 接收 int类性的值
-        int number = scanner.nextInt();
-
-        //打印
-        System.out.println("输入的数字是:"+number);
-
-        //注意:
-        // 输入类型必须 匹配 不匹配报错
-
-    }
-}

+ 0 - 48
JavaSE/day03/src/TestScanner02.java

@@ -1,48 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestScanner02 {
-
-
-    //Scanner
-    public static void main(String[] args) {
-        //创建对象
-        Scanner scanner = new Scanner(System.in);
-
-        //输入个人信息
-        // 名称  zs
-        // 年龄  22
-        // 体重  78.9
-        // 是否结婚 false
-        // 是否成年 是
-        System.out.println("请输入名称");
-        String name = scanner.next();
-
-        System.out.println("请输入年龄");
-        int age = scanner.nextInt();
-
-        System.out.println("请输入体重");
-        double weight = scanner.nextDouble();
-
-        System.out.println("请婚姻状况 true false");
-        boolean isMarry = scanner.nextBoolean();
-
-        System.out.println("年满十八岁? 是/否");
-        char isMan  = scanner.next().charAt(0);
-
-        System.out.println("我的个人信息如下");
-
-        System.out.println("名称:"+name);
-        System.out.println("年龄:"+age);
-        System.out.println("体重:"+weight);
-        System.out.println("婚姻状况:"+isMarry);
-        System.out.println("是否成年:"+isMan);
-
-    }
-}

+ 0 - 48
JavaSE/day03/src/TestSwitch04.java

@@ -1,48 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestSwitch04 {
-
-    //根据数字 显示星期
-    public static void main(String[] args) {
-
-        //输入数字
-        Scanner scanner = new Scanner(System.in);
-
-        System.out.println("请输入正整数数字");
-        int i = scanner.nextInt();
-
-        switch (i){
-            case 1:
-                System.out.println("星期1");
-                break;
-            case 2:
-                System.out.println("星期2");
-                break;
-            case 3:
-                System.out.println("星期3");
-                break;
-            case 4:
-                System.out.println("星期4");
-                break;
-            case 5:
-                System.out.println("星期5");
-                break;
-            case 6:
-                System.out.println("星期6");
-                break;
-            case 7:
-                System.out.println("星期日");
-                break;
-            default:
-                System.out.println("输入的星期不存在!!");
-
-        }
-    }
-}

+ 0 - 35
JavaSE/day03/src/TestSwitch05.java

@@ -1,35 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestSwitch05 {
-
-    //switch(表达式)中表达式的值必须是下述几种类型之一:
-    // byte,short,char,int,枚举 (jdk 5.0) 后面学习,String (jdk 7.0);
-    // case子句中的值必须是常量,不能是变量名或不确定的表达式值或范围;
-    // 同一个switch语句,所有case子句中的常量值互不相同;
-    // break语句用来在执行完一个case分支后使程序跳出switch语句块;如果没有break,程序会顺序执行到switch结尾;
-    // default子句是可选的。同时,位置也是灵活的。当没有匹配的case时,执行default语句。
-    public static void main(String[] args) {
-
-        String i = "c";
-
-        switch (i){
-            case "a":
-                System.out.println("1");
-                break;
-            case "b":
-                System.out.println("2");
-                break;
-            default:
-                System.out.println("不存在!!");
-                //break;
-
-        }
-    }
-}

+ 0 - 62
JavaSE/day03/src/TestSwitch06.java

@@ -1,62 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestSwitch06 {
-
-     public static void main(String[] args) {
-         //输入
-         Scanner scanner = new Scanner(System.in);
-         //判断验证年月日是否符合。
-
-         //输入年月日
-         System.out.println("请输入年份!");
-         int year = scanner.nextInt();
-         System.out.println("请输入月份!");
-         int month = scanner.nextInt();
-         System.out.println("请输入天数!");
-         int day = scanner.nextInt();
-
-         //计算总天数
-         int days = 0;
-
-         switch (month){
-             case 12:
-                 days+= 30;
-             case 11:
-                 days+= 31;
-             case 10:
-                 days+= 30;
-             case 9:
-                 days+= 31;
-             case 8:
-                 days+= 31;
-             case 7:
-                 days+= 30;
-             case 6:
-                 days+= 31;
-             case 5:
-                 days+= 30;
-             case 4:
-                 days+= 31;
-             case 3:
-                 //是否是闰年
-                 if ( year % 4 == 0 && year %100 != 0  || year % 400 ==0  ){
-                     days++;
-                 }
-                 days+= 28;
-             case 2:
-                 days+= 31;
-             case 1:
-                 days+= day;
-         }
-
-
-         System.out.println(year+"年"+month+"月"+days+"日 是当年的第"+days+"天");
-     }
-}

+ 0 - 47
JavaSE/day03/src/TestWhile10.java

@@ -1,47 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestWhile10 {
-
-     public static void main(String[] args) {
-        //while 循环10次 hello
-        //初始化
-         int i = 1;
-         //判断
-         while ( i < 10){
-             //执行体
-             System.out.println((i+1)+" hello");
-             //迭代
-             i++;
-         }
-
-         // 水井深12米,青蛙第一天跳1米,之后每天比前一天多跳0.2米.请问几天能跳出井.
-         //  while 循环特点:没有明确循环次数。
-         //  12   跳的高度 1   1.2   1.4
-         //  剩余高读 12 -  跳的高度 > 0
-
-         double num = 1; //初始高度
-         double dis = 0; //跳的高度的总和
-         int count = 0;
-
-         while ( dis < 12  ){
-             //高度的总和
-             dis += num;
-             //每天的高度
-             num+=0.2;
-
-             //计数
-             count++;
-         }
-         System.out.println("用了"+count+"天");
-
-
-
-     }
-}

+ 0 - 48
JavaSE/day03/src/TestWhile11.java

@@ -1,48 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestWhile11 {
-
-     public static void main(String[] args) {
-        /*
-        随机生成一个100以内的数,猜这个随机数是多少?
-        从键盘输入数,如果大了,提示猜大了;如果小了,提示猜小了;如果对了,就不再猜了,
-        并统计一共猜了多少次。
-         */
-
-         Scanner scanner = new Scanner(System.in);
-         //随机数
-         int num = (int)(Math.random()*100);
-         System.out.println("请输入数字");
-         //输入
-         int inputNum = scanner.nextInt();
-
-         int count = 0;
-         //不相等进入循环
-         while ( inputNum != num ){
-            if (inputNum > num){
-                System.out.println("猜大了");
-            }
-
-            if ( inputNum < num ){
-                System.out.println("猜小了");
-            }
-             System.out.println("请输入数字");
-            //输入值改变
-             inputNum = scanner.nextInt();
-             //count
-
-             count++;
-         }
-
-         System.out.println("随机数是:"+num);
-         System.out.println("猜测次数:"+count);
-
-     }
-}

+ 0 - 48
JavaSE/day03/src/TestWhileBreak16.java

@@ -1,48 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestWhileBreak16 {
-
-     public static void main(String[] args) {
-        /*
-        随机生成一个100以内的数,猜这个随机数是多少?
-        从键盘输入数,如果大了,提示猜大了;如果小了,提示猜小了;如果对了,就不再猜了,
-        并统计一共猜了多少次。
-         */
-
-         Scanner scanner = new Scanner(System.in);
-         //随机数
-         int num = (int)(Math.random()*100);
-
-         int count = 0;
-         //不相等进入循环
-         while ( true ){
-                //输入
-                System.out.println("请输入数字");
-                int inputNum = scanner.nextInt();
-
-                if (inputNum > num){
-                    System.out.println("猜大了");
-                }
-                if ( inputNum < num ){
-                    System.out.println("猜小了");
-                }
-                if (inputNum == num){
-                    System.out.println("猜对了");
-                    break;
-                }
-                //count
-                count++;
-         }
-
-         System.out.println("随机数是:"+num);
-         System.out.println("猜测次数:"+count);
-
-     }
-}

+ 0 - 44
JavaSE/day03/src/TestZhiShu17.java

@@ -1,44 +0,0 @@
-import java.util.Scanner;
-
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class TestZhiShu17 {
-
-     public static void main(String[] args) {
-        /*
-         2-1000之间的素数
-         */
-
-         long start = System.currentTimeMillis();
-         //boolean flag = true; //8430  优化1  8502   优化2 814   优化3  对i开方  9
-         // 25 取模  2 - 24
-         // 25 的开方
-         for (int i = 2; i < 100000 ; i++) {
-             boolean flag = true;
-             //内
-             for (int k = 2; k <= Math.sqrt(i) ; k++) {
-                 if ( i % k == 0 ){
-                     //标识
-                     flag = false;
-                     //停止 优化2 break
-                     break;
-                 }
-             }
-
-             if (flag){
-                 //System.out.println(i+"是素数");
-             }
-             //flag = true;
-         }
-
-         long end = System.currentTimeMillis();
-
-         System.out.println(end - start);
-
-     }
-}

+ 0 - 29
JavaSE/day03/src/Testbc15.java

@@ -1,29 +0,0 @@
-/**
- * ClassName: TestScanner01
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/11/20 9:14
- * @Version 1.0
- */
-public class Testbc15 {
-
-     public static void main(String[] args) {
-          //break
-          for (int i = 0; i < 10; i++) {
-               if (i == 3){
-                    break;
-               }
-               System.out.println("hello world");
-          }
-
-          System.out.println("-----------------");
-          //continue
-          for (int i = 0; i < 10; i++) {
-               if (i == 3){
-                   continue;
-               }
-               System.out.println((i+1)+" hello world");
-          }
-
-     }
-}

+ 10 - 8
.idea/VIPQ.iml → JavaSE/day04/day04.iml

@@ -1,9 +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$" />
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
+<?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>

+ 0 - 16
JavaSE/day04/pom.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.sf</groupId>
-    <artifactId>day04</artifactId>
-    <version>1.0-SNAPSHOT</version>
-
-    <properties>
-        <maven.compiler.source>8</maven.compiler.source>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
-</project>

+ 49 - 0
JavaSE/day04/src/com/lc/day04/arr03/Test05.java

@@ -0,0 +1,49 @@
+package com.lc.day04.arr03;
+
+/**
+ * ClassName: Test05
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 10:12
+ * @Version 1.0
+ */
+public class Test05 {
+
+    //数组的使用
+    public static void main(String[] args) {
+        //声明
+        //String[] names;
+
+        //初始化 赋值
+        // 静态初始化 复杂
+        String[] names1 = new String[]{ "张三","李四","坤坤" };
+
+        // 静态初始化 简单
+        int[] ages = {22,26,29};
+
+        // 动态初始化
+        String[] names2 = new String[3];
+
+
+        //引用数据类型 位置 在堆中 回首元素的地址
+        System.out.println(names1); //地址值。[Ljava.lang.String;@4eec7777
+
+        //连续的空间
+        // 下标 0 - 长度-1
+        System.out.println(names1[0]);
+        System.out.println(names1[1]);
+        System.out.println(names1[2]);
+
+        //数组的长度 固定
+        // 属性 length
+        //names1.length = 10; //不可以 更改
+        System.out.println("数组的长度:"+names1.length);
+
+        //通过索引操作效率非常高
+
+        //回首元素的地址 第一个元素的地址。
+
+
+
+    }
+}

+ 29 - 0
JavaSE/day04/src/com/lc/day04/arr04/Test01.java

@@ -0,0 +1,29 @@
+package com.lc.day04.arr04;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 11:01
+ * @Version 1.0
+ */
+public class Test01 {
+    //数组遍历
+    public static void main(String[] args) {
+
+        String[] moves = {"灌篮高手","志愿军","长津湖","北纬38度","金刚川"};
+        //遍历
+        //  moves.length 数组长度
+        for (int i = 0; i < moves.length; i++) {
+            //索引
+            System.out.print(" "+moves[i]);
+        }
+
+        moves[1] = "志愿军:雄兵出击";
+        System.out.println();
+        //遍历
+        for (int i = 0; i < moves.length; i++) {
+            System.out.print(" "+moves[i]);
+        }
+    }
+}

+ 63 - 0
JavaSE/day04/src/com/lc/day04/arr05/Test01.java

@@ -0,0 +1,63 @@
+package com.lc.day04.arr05;
+
+import java.util.Arrays;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 14:34
+ * @Version 1.0
+ */
+public class Test01 {
+
+    // 创建一个长度为6的int型数组,
+    // 要求数组元素的值都在1-10之间,且是随机赋值元素的值各不相同。
+    /*
+        [ 1 ,2 ,3 ,4  , , ]
+
+        随机数 1  2  3  4  4
+
+        第几个 元素 外层的 i
+
+                   内层循环  比较  是否 重写  通过 i 控制 内层循环 比较次数。
+
+                   标识
+                   i --
+     */
+    public static void main(String[] args) {
+        //数组
+        int[] arr = new int[6];
+
+        for (int i = 0; i < arr.length; i++) {
+            //随机数
+            int random =(int)(Math.random() * 10)+1;
+            //赋值
+            arr[i] = random;
+            //比较
+            for (int k = 0; k < i; k++) {
+                if (arr[k] == random){
+                    i --;
+                    break;
+                }
+            }
+        }
+
+        //Arrays.toString遍历输出
+        System.out.println(Arrays.toString(arr));
+    }
+
+    //动态初始化
+    public static void main1(String[] args) {
+        //数组
+        int[] arr = new int[3];
+
+        //索引
+        arr[0] = 22;
+
+        System.out.println(arr[0]);
+
+    }
+
+
+}

+ 30 - 0
JavaSE/day04/src/com/lc/day04/arr05/Test02.java

@@ -0,0 +1,30 @@
+package com.lc.day04.arr05;
+
+import java.util.Arrays;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 14:34
+ * @Version 1.0
+ */
+public class Test02 {
+
+
+    public static void main(String[] args) {
+        //数组
+        int[] arr = new int[6];
+        System.out.println(arr[0]);
+
+        double[] arr1 = new double[2];
+        System.out.println(arr1[0]); //0.0
+
+        //string
+        String[] arr2 = new String[2];
+
+        System.out.println(arr2[0]); //null
+    }
+
+
+}

+ 35 - 0
JavaSE/day04/src/com/lc/day04/arr06/Test01.java

@@ -0,0 +1,35 @@
+package com.lc.day04.arr06;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 15:22
+ * @Version 1.0
+ */
+public class Test01 {
+    public static void main(String[] args) {
+
+        int[] arr1 = new int[3];
+        int[] arr2 = new int[3];
+        int[] arr3 = new int[3];
+
+        System.out.println(arr1); //7777
+        arr1[0] = 1;
+        arr1[1] = 2;
+        arr1[2] = 3;
+        //地址
+        arr2 = arr1;
+
+        arr3 = arr2;
+
+        System.out.println(arr2[0]); // ?
+        System.out.println(arr2[1]); //
+        System.out.println(arr2[2]); //
+
+
+        System.out.println(arr3[0]);
+        System.out.println(arr3[1]);
+        System.out.println(arr3[2]);
+    }
+}

+ 23 - 0
JavaSE/day04/src/com/lc/day04/arr07/Test01.java

@@ -0,0 +1,23 @@
+package com.lc.day04.arr07;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 15:37
+ * @Version 1.0
+ */
+public class Test01 {
+
+    public static void main(String[] args) {
+        int[] arr  = new int[2];
+
+        //ArrayIndexOutOfBoundsException 数组越界
+        //System.out.println(arr[2]); //不存在
+
+        arr = null;
+        System.out.println(arr[0]);
+
+        //NullPointerException 空指针异常
+    }
+}

+ 39 - 0
JavaSE/day04/src/com/lc/day04/bc01/Test01.java

@@ -0,0 +1,39 @@
+package com.lc.day04.bc01;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 9:24
+ * @Version 1.0
+ */
+public class Test01 {
+    //break和continue
+    public static void main(String[] args) {
+
+        //break continue
+        // 关键字后面不能写代码
+        for (int i = 0; i < 10; i++) {
+            if (i == 3 ){
+                //break;
+                continue;
+            }
+            System.out.println("hello "+i);
+        }
+
+        System.out.println("----------------");
+        int k = 0;
+        while (true){
+            if ( k == 3 ){
+                //break;
+                continue;
+            }
+            System.out.println("hello "+k);
+            k++;
+        }
+
+
+        //
+
+    }
+}

+ 62 - 0
JavaSE/day04/src/com/lc/day04/bc02/Test02.java

@@ -0,0 +1,62 @@
+package com.lc.day04.bc02;
+
+/**
+ * ClassName: Test02
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 9:30
+ * @Version 1.0
+ */
+public class Test02 {
+    /*
+    **题目:找出100以内所有的素数(质数)?100000以内的呢?**
+
+    目的:不同的代码的实现方式,可以效率差别很大。
+
+    分析:素数(质数):只能被1和它本身整除的自然数。  --->
+    从2开始,到这个数-1为止,此范围内没有这个数的约数。则此数是一个质数。
+    比如:2、3、5、7、11、13、17、19、23、...
+
+        3-100
+        3 取模  2
+        4 取模  2 3
+        5 取模  2 3 4
+        *
+        100  取模  2 - 99
+        *
+
+        标志 判断
+
+        外循环 素数判断
+
+        内循环  素数条件
+     */
+    public static void main(String[] args) {
+        //时间
+        long start = System.currentTimeMillis();
+        // 1-100
+        for (int i = 3; i < 100000; i++) {
+            //标识
+            boolean flag = true;
+
+            //素数条件
+            for (int j = 2; j < i; j++) {
+                //取模 判断
+                if ( i % j == 0 ){
+                    //标识
+                    flag = false;
+                }
+            }
+            //判断
+            if (flag){
+                //System.out.println(i +"是质数");
+            }
+        }
+
+        long end = System.currentTimeMillis();
+
+        //时间
+        System.out.println(end - start);
+
+    }
+}

+ 66 - 0
JavaSE/day04/src/com/lc/day04/bc02/Test03.java

@@ -0,0 +1,66 @@
+package com.lc.day04.bc02;
+
+/**
+ * ClassName: Test02
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 9:30
+ * @Version 1.0
+ */
+public class Test03 {
+    /*
+    **题目:找出100以内所有的素数(质数)?100000以内的呢?**
+
+    目的:不同的代码的实现方式,可以效率差别很大。
+
+    分析:素数(质数):只能被1和它本身整除的自然数。  --->
+    从2开始,到这个数-1为止,此范围内没有这个数的约数。则此数是一个质数。
+    比如:2、3、5、7、11、13、17、19、23、...
+
+        3-100
+        3 取模  2
+        4 取模  2 3
+        5 取模  2 3 4
+        *
+
+        36 取模 2 - 6
+        100  取模  2 - 99
+        *
+
+        标志 判断
+
+        外循环 素数判断
+
+        内循环  素数条件
+     */
+    public static void main(String[] args) {
+        //时间
+        long start = System.currentTimeMillis();
+        // 1-100
+        for (int i = 3; i < 100000; i++) {
+            //标识
+            boolean flag = true;
+
+            //素数条件  i 开方
+            for (int j = 2; j <= Math.sqrt(i); j++) {
+                //取模 判断
+                if ( i % j == 0 ){
+                    //标识
+                    flag = false;
+                    // 停止
+                    break;
+                }
+            }
+            //判断
+            if (flag){
+                //System.out.println(i +"是质数");
+            }
+        }
+
+        long end = System.currentTimeMillis();
+
+        //时间
+        System.out.println(end - start);
+
+    }
+}

+ 27 - 0
JavaSE/day04/src/com/lc/day04/bc02/Test04.java

@@ -0,0 +1,27 @@
+package com.lc.day04.bc02;
+
+/**
+ * ClassName: Test04
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 9:59
+ * @Version 1.0
+ */
+public class Test04 {
+    //死循环
+    public static void main(String[] args) {
+
+        //死循环
+//        while (true){
+//            System.out.println("1");
+//        }
+
+        for (;true ; ) {
+            System.out.println("1");
+        }
+
+        //后面不能写代码
+        //System.out.println("123");
+    }
+
+}

+ 52 - 0
JavaSE/day04/src/com/lc/day04/exer01/Test01.java

@@ -0,0 +1,52 @@
+package com.lc.day04.exer01;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 10:49
+ * @Version 1.0
+ */
+public class Test01 {
+    /*
+    - 声明String数组,记录你最喜欢电影的名称最少5部。
+    - 声明String数组,记录你最喜欢的女演员 最少6位。
+    - 声明double数组,记录你最最近的体重状况 6天。
+    - 使用 下标查看第一个数组的 第2部电影
+    - 使用 下标查看第二个数组的 第3位演员
+    - 使用 下标查看第三个数组的 第4天的体重 输出
+    - 修改第一个数组 的第三部电影为  《志愿军:雄兵出击》
+    - 修改第二个数组 的最后一位为  徐帆
+     */
+    public static void main(String[] args) {
+
+        //数组的声明和初始化
+        String[] moves = {"灌篮高手","志愿军","长津湖","北纬38度","金刚川"};
+
+        String[] names = {"坤坤","峰峰","凡凡","赵丽颖","杨幂"};
+
+        double[] weight = {80.0,81.2,82.3,84.2,83.2};
+
+        //操作
+        //  长度  名称.length 数组的长度, 不可变。
+        // 下标   0 开始, 数组的长度 - 1 结束。
+        //       连续  每次 加1.
+        //  数组名[下标]
+        System.out.println(moves[1]);
+        System.out.println(names[2]);
+        System.out.println(weight[4]);
+
+        // 修改
+        moves[2] = "志愿军:雄兵出击";
+
+        // 最后一位 length
+        names[names.length - 1] = "徐帆";
+
+        System.out.println(moves[2]);
+        System.out.println(names[names.length - 1]);
+
+
+    }
+
+
+}

+ 76 - 0
JavaSE/day04/src/com/lc/day04/exer01/Test02.java

@@ -0,0 +1,76 @@
+package com.lc.day04.exer01;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 10:49
+ * @Version 1.0
+ */
+public class Test02 {
+    public static void main(String[] args) {
+        //求数组元素的最小值  索引位置
+        int[] arr = {101, 10, 29, 234, 2345, 64356, 123 , 10 , 10};
+
+        int min = arr[0];
+
+        //索引
+        String index = "";
+
+        for (int i = 0; i < arr.length; i++) {
+            if (arr[i] < min){
+                min = arr[i];
+
+                //索引
+                index = i+"";
+            }
+        }
+
+        System.out.println("索引:"+index +"最小值:"+min);
+
+    }
+
+    public static void main2(String[] args) {
+        //求数组元素的最大值
+        int[] arr = {1, 10, 29, 234, 2345, 64356, 123};
+
+        //定义数组的第一个
+        int max = arr[0];
+
+        //循环
+        for (int i = 0; i < arr.length; i++) {
+            //大于最大值替换
+            if (arr[i] > max){
+                //替换
+                max = arr[i];
+            }
+        }
+
+        System.out.println("最大值:"+max);
+
+
+    }
+
+    public static void main1(String[] args) {
+        //数组统计:求总和、均值
+        int[] arr = {1,10,29,234,2345,64356,123};
+
+        //标识 和
+        int sum = 0;
+
+        for (int i = 0; i < arr.length; i++) {
+            //加=
+            sum = sum + arr[i];
+        }
+
+        System.out.println("数组的和:"+sum);
+
+        //平均数
+        int i = sum / arr.length;
+        System.out.println("数组的平均值:"+i);
+
+
+    }
+
+
+}

+ 34 - 0
JavaSE/day04/src/com/lc/day04/exer01/Test03.java

@@ -0,0 +1,34 @@
+package com.lc.day04.exer01;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 10:49
+ * @Version 1.0
+ */
+public class Test03 {
+    public static void main(String[] args) {
+        //找最值及其所有最值的下标
+        int[] arr = {101, 12, 29, 234, 10 ,2345, 64356, 123, 10, 10};
+
+        //索引
+        String index = "";
+        //最小值
+        int min = arr[0];
+
+        for (int i = 0; i < arr.length; i++) {
+            if ( arr[i] < min ){
+                min = arr[i];
+                index = i+"";
+            }else if ( arr[i] == min ){
+                index += ","+i;
+            }
+        }
+
+        System.out.println("index:"+index);
+        System.out.println("min:"+min);
+    }
+
+
+}

+ 42 - 0
JavaSE/day04/src/com/lc/day04/exer01/Test04.java

@@ -0,0 +1,42 @@
+package com.lc.day04.exer01;
+
+/**
+ * ClassName: Test04
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 14:12
+ * @Version 1.0
+ */
+public class Test04 {
+    public static void main(String[] args) {
+        /*
+            数组 :和
+            最大子数组 : 和
+
+            数组和 比较  最大子数组
+                大于 替换
+                小于 0 舍弃
+         */
+
+        int[] arr = {1, -2, 3, 10, -4, 7, 2, -5};
+
+        int sum = 0;
+
+        int maxSum = 0;
+
+        for (int i = 0; i < arr.length; i++) {
+            //数组和
+            sum+=arr[i];
+            if (sum < 0){
+                sum = 0;
+            }
+
+            // 大于
+            if (sum > maxSum){
+                maxSum = sum;
+            }
+        }
+
+        System.out.println(maxSum);
+    }
+}

+ 95 - 0
JavaSE/day04/src/com/lc/day04/exer02/Test01.java

@@ -0,0 +1,95 @@
+package com.lc.day04.exer02;
+
+import java.util.Scanner;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 16:05
+ * @Version 1.0
+ */
+public class Test01 {
+
+    /*
+        准备内容
+     */
+    public static void main(String[] args) throws InterruptedException {
+        String[] hert = {
+                "你认为精神出轨和肉体出轨哪个比较严重?",
+            "因为什么事情,哭得特别难受?",
+            "哭得最伤心的是哪一次?为什么?",
+            "收到过最难忘的礼物是什么?",
+            "谁是你最崇拜的人?为什么?",
+            "早上吃什么?中午吃什么?晚上吃什么?",
+            "我们在一起你快乐吗?",
+            "有没有自己偷偷看过大片?",
+            "你现在还是单身吗?",
+            "你最想要的5样东西",
+            "裤是什么颜色?"
+        };
+
+        String[] adv = {
+                "原地转十圈然后靠一个人身上",
+                "把右边第一个横抱起来",
+                "挤出护手霜,帮最近的异性涂",
+                "随便抓个人说,我怀了你的孩子",
+                "右手捏住左耳垂,弯下腰,转十圈,再金鸡独立十秒",
+                "吃下每个人为你夹得菜",
+                "抱着正对面人的大腿唱情歌",
+                "选一个男生,锤他胸口,并说“你好厌恶哦”",
+                "学超级名模走秀绕场一周",
+                "想办法让指定的一名异性兴奋起来",
+        };
+
+        String[] person = {"琼月","虞彩","寒雁","琼霎","凤采","惠莹","依枝","雅蕾"};
+
+        //游戏开始
+        System.out.println("----------真心话大冒险游戏-------------");
+        //选人
+        int pIndex = (int) (Math.random()*person.length);
+
+        System.out.println("随机人员是:");
+        for (int i = 0; i < 3; i++) {
+            Thread.sleep(1000);
+            System.out.println((3-i));
+        }
+        //展示人员
+        System.out.println( person[pIndex] );
+
+        while (true){
+            System.out.println(" 选择 1真心话  2 大冒险");
+            Scanner scanner = new Scanner(System.in);
+
+            int i = scanner.nextInt();
+            if ( i != 1 && i != 2 ){
+                System.out.println("请输入 1 或者 2");
+            }
+
+            switch (i){
+                case 1:
+                    int hIndex = (int) (Math.random()*hert.length);
+                    System.out.println("内容是:");
+                    System.out.println();
+                    System.out.println(hert[hIndex]);
+                    break;
+                case 2:
+                    int aIndex = (int) (Math.random()*adv.length);
+                    System.out.println("内容是:");
+                    System.out.println();
+                    System.out.println(adv[aIndex]);
+                    break;
+            }
+
+            System.out.println("是否继续游戏");
+            System.out.println("1 继续  2 退出");
+            int num = scanner.nextInt();
+            if (num == 2){
+                break;
+            }
+        }
+
+
+    }
+
+}

+ 91 - 0
JavaSE/day04/src/com/lc/day04/exer02/Test02.java

@@ -0,0 +1,91 @@
+package com.lc.day04.exer02;
+
+import java.util.Arrays;
+import java.util.Scanner;
+
+/**
+ * ClassName: Test01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/11 16:05
+ * @Version 1.0
+ */
+public class Test02 {
+
+
+    public static void main(String[] args) throws InterruptedException {
+        int[] blueArr = new int[5];
+
+        for (int i = 0; i < blueArr.length; i++) {
+            //随机数
+            int random =(int)(Math.random() * 10)+1;
+            //赋值
+            blueArr[i] = random;
+            //比较
+            for (int k = 0; k < i; k++) {
+                if (blueArr[k] == random){
+                    i --;
+                    break;
+                }
+            }
+        }
+
+
+        int[] inputBlueArr = new int[5];
+        //输入
+        Scanner sc = new Scanner(System.in);
+        for (int i = 0; i < 5; i++) {
+            System.out.println("请输入第"+(i+1)+"个蓝球");
+            int num = sc.nextInt();
+
+            inputBlueArr[i] = num;
+            //比较
+            for (int k = 0; k < i; k++) {
+                if (inputBlueArr[k] == num){
+                    i --;
+                    System.out.println("请重新输入");
+                    break;
+                }
+            }
+        }
+
+        int redBall = (int)(Math.random() * 7)+1;
+        System.out.println("请输入红球");
+
+        int inputRedBall = sc.nextInt();
+
+        //比较
+        int count = 0;
+
+        for (int i = 0; i < blueArr.length; i++) {
+            for (int k = 0; k < inputBlueArr.length; k++) {
+                if ( blueArr[i] == inputBlueArr[k] ){
+                    count++;
+                }
+            }
+        }
+
+        if ( count == 5 && inputRedBall == redBall ){
+            System.out.println("一等奖");
+        }  else if ( count == 5  ){
+            System.out.println("二等奖");
+        }  else if ( count == 3 && inputRedBall == redBall ){
+            System.out.println("三等奖");
+        }  else if ( count == 3  ){
+            System.out.println("四等奖");
+        }  else if ( count == 2 && inputRedBall == redBall ){
+            System.out.println("五等奖");
+        }  else if ( count == 2 || inputRedBall == redBall ){
+            System.out.println("六等奖");
+        }  else {
+            System.out.println("遗憾");
+        }
+
+        System.out.println(Arrays.toString(blueArr));
+        System.out.println(Arrays.toString(inputBlueArr));
+
+        System.out.println("红:"+redBall+"-输入红球:"+inputRedBall);
+        System.out.println(count);
+    }
+
+}

+ 178 - 0
JavaSE/day04/src/com/lc/day04/exer02/Test03.java

@@ -0,0 +1,178 @@
+package com.lc.day04.exer02;
+
+import java.util.Scanner;
+
+/**
+ * ClassName: Test03
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/12 17:02
+ * @Version 1.0
+ */
+public class Test03 {
+
+        public static void main(String[] args) {int money;boolean play=true;
+            Scanner scanner=new Scanner(System.in);int getin;int bei;int _final;int ori;
+
+            System.out.println("你想要多少钱作为起始资金");
+            money=scanner.nextInt();
+
+            while(true) {
+                int get=0; ori=money;
+                System.out.println("输入你的下注以及基础倍率");
+                System.out.println("下注为");
+                int in = scanner.nextInt();
+                System.out.println("你还剩下"+(money-in)+"元");
+                while(true) {
+                    System.out.println("你要的基础倍率为(基础倍率每加1,入场费加五十,入场费的基础为100)");
+                    bei = scanner.nextInt();
+                    getin = 50 * bei;
+                    System.out.println("入场费为"+getin+"确定吗??(true or false)");
+                    boolean toopen=scanner.nextBoolean();
+                    if(toopen==false){
+                        continue;
+                    }
+                    System.out.println("输入完毕");
+                    break;
+                }
+                money=money-in-getin;
+                if(money<0)
+                {
+                    System.out.println("你的钱不够,不该来这里");
+                    continue;
+                }
+                System.out.println("你还剩下"+money+"元");
+                int[] input_1 = new int[5];
+                int input;
+                boolean judge = true;
+                System.out.println("输入五个红色球(1~36)");
+                while (true)
+                {
+                    for (int i = 0; i < 5; i++)
+                    {
+                        input_1[i] = scanner.nextInt();
+                        for(int j=0;j<i;j++)
+                        {
+                            if(input_1[i]==input_1[j])
+                            {
+                                judge=false;
+                                System.out.println("数据输入有误,请输入不重复的数据");
+                                break;
+                            }
+                        }
+                        if(input_1[i]>36||input_1[i]<=0)
+                        {
+                            judge=false;
+                            System.out.println("数据输入错误,重新输入(1~36)");
+                            break;
+                        }
+                        else if(input_1[i]>=0&&input_1[i]<=36)
+                        {
+                            if(4-i!=0)
+                                System.out.println("还需输入" + (4 - i) + "个");
+                            else if(4-i==0)
+                                System.out.println("输入完毕");
+                        }
+                    }
+                    if(judge==false)
+                    {
+                        judge=true;
+                        continue;
+                    }
+                    if(judge==true)
+                        break;
+                }
+
+
+
+
+                while(true){
+                    System.out.println("输入蓝球");
+                    input = scanner.nextInt();
+                    if(input>7) {
+                        System.out.println("重新输入");
+                        continue;
+                    }
+                    break;}
+                int[] output = new int[5];
+                for (int i = 0; i < 5; i++) {
+                    output[i] = (int) (Math.random() * 100) % 35 + 1;
+                    int r = output[i];
+                    for (int j = 0; j < i; j++)
+                        if (r == output[j]) {
+                            i--;
+                            break;
+                        }
+                }
+                int output_1 = (int) (Math.random() * 10) % 7 + 1;
+                int red = 0, blue = 0;
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 5; j++) {
+                        if (input_1[i] == output[j])
+                            red++;
+                    }
+                }
+                if (input == output_1)
+                    blue++;
+                System.out.println("开奖啦!!!");
+
+                System.out.println("红球即将出现!!!");
+
+                for(int i=0;i<5;i++)
+                {  System.out.print("第"+(i+1)+"个红球是---");
+                    try {
+                        Thread.sleep(1000);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                    System.out.println(output[i]+" ");
+                }
+                System.out.println("你猜的是");
+                for(int i=0;i<5;i++) {
+
+                    System.out.print(input_1[i]);
+                }
+                System.out.println("蓝球即将揭晓!!");try {
+                    Thread.sleep(2000);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                if(blue==1)
+                    System.out.println(output_1+"你猜对啦!!!!");
+                else if(blue==0)
+                    System.out.println("很遗憾,蓝球是"+output_1+"而你猜的是"+input);
+                System.out.println("你猜对了"+"red"+"个红球");
+                if (red >= 2) {
+                    for (int i = 0; i < red; i++)
+                        bei *= 200;
+                    if (blue == 1)
+                        bei *= 5000;
+                    get = in * bei;
+                    money = money+ get;
+
+                } else if(red<2)
+                    ;
+                if(ori-money<0)
+                    System.out.println("你挣了"+(money-ori)+"元");
+                else if(ori-money>0)
+                    System.out.println("你亏了"+(ori-money)+"元");
+                System.out.println("你现在还有" + money + "元");
+                if(money<0)
+                    break;
+                else
+                {
+                    System.out.println("继续玩吗??(true/false)");
+                    play = scanner.nextBoolean();
+                    if (play == false)
+                        break;
+                }
+
+            }
+            System.out.println("游戏结束,你最终有"+money+"元");
+
+
+
+        }
+
+
+}

+ 0 - 55
JavaSE/day04/src/main/java/com/sf/Day04.java

@@ -1,55 +0,0 @@
-package com.sf;
-
-public class Day04 {
-    public static void main(String[] args) {
-        int a = 1;
-        a=2;
-        /**
-         * 定义数组
-         *  语法:数据类型[] 数组的变量名
-         *  定义了一个数据类型为int类型,变量名为arr的整形数组
-         */
-        int[] arr;
-
-        /**
-         * 定义数组的方式二
-         * 数据类型 变量名[];
-         * 定义了一个int类型的变量,变量名是arr数组
-         */
-        int arr2[];
-
-        double[] aa;
-        double bb[];
-        String[] cc;  //推荐
-        String dd[];
-
-/**
- * 数组的静态初始化,
- * 语法:数据类型[] 变量名 = new 数据类型[]{数据1,数据2,数据3,…};
- */
-        int[]  ee = new int[]{1,2,3,4};
-
-
-        /**
-         * int[] arr;
-         * arr = new int[]{1,2,3,4,5};//正确
-         */
-        int[] abc;
-        abc = new int[]{5,6,7,8};
-
-
-        /**
-         * 简化格式:
-         * 数据类型[] 变量名 = {数据1,数据2,数据3,…};
-         */
-        int[] ff = {1,2,3};   //常用  推荐
-        String[] person = {"qq","ww","ee"};
-        String[] person1 = new String[]{"qq","ww","ee"};
-        int[] gg;
-        gg= new int[]{1, 2, 3};
-
-
-
-    }
-
-}

+ 0 - 12
JavaSE/day04/src/main/java/com/sf/Test1.java

@@ -1,12 +0,0 @@
-package com.sf;
-
-public class Test1 {
-    public static void main(String[] args) {
-        int[] arr = {1,2,3,4,5};
-        char[] word = {'h','e','l','l','o'};
-        String[] heros = {"袁隆平","邓稼先","钱学森"};
-        System.out.println(arr);
-        System.out.println(word);
-        System.out.println(heros);
-    }
-}

+ 0 - 41
JavaSE/day04/src/main/java/com/sf/Test2.java

@@ -1,41 +0,0 @@
-package com.sf;
-
-public class Test2 {
-    public static void main(String[] args) {
-
-
-        String[] str = {"电视剧1", "电视剧2", "电视剧3", "电视剧4", "电视剧5", "电视剧6"};
-
-        String[] subject = {"学科1", "学科2", "学科3", "学科4", "学科5", "学科6"};
-
-        int[] score = {99, 98, 97, 96, 95};
-        int length = score.length;
-//        System.out.println("数组的长度"+length);
-
-        /**
-         * 数组名[索引/下标]
-         */
-        String[] person = {"张三","李四","王五","赵六","孙七","李八","王九"};
-        System.out.println("当前数组的长度"+person.length);
-        String zs = person[0]; //张三
-        System.out.println(zs);
-        String ls = person[1]; //李四
-        System.out.println(ls);
-        String ww = person[2]; //王五
-        System.out.println(ww);
-//        System.out.println(person[3]);
-
-//        //张三和王五换个位置
-//        person[0]="王五";
-//        person[2]="张三";
-//        System.out.println("更改后的"+person[2]);
-//
-        System.out.println(person.length);
-        for (int i = 0 ;i< person.length;i++){
-            String person1 = person[i];
-            System.out.println(person1);
-        }
-
-
-    }
-}

+ 0 - 26
JavaSE/day04/src/main/java/com/sf/Test3.java

@@ -1,26 +0,0 @@
-package com.sf;
-
-public class Test3 {
-    /**
-     * 求和   求平均值
-     * @param args
-     */
-    public static void main(String[] args) {
-        int[] arr = {4,5,6,1,9};
-        int sum = 0;
-        for (int i=0 ; i< arr.length;i++){
-            sum += arr[i];
-        }
-        System.out.println("当前总和==="+sum);
-        //平均值  sum/arr.length
-        if(arr.length > 0){
-            int avg = sum/arr.length ;
-            System.out.println("当前数组的平均值==>"+avg);
-        }else {
-            System.out.println("当前数组为空");
-        }
-
-
-
-    }
-}

+ 0 - 21
JavaSE/day04/src/main/java/com/sf/Test4.java

@@ -1,21 +0,0 @@
-package com.sf;
-
-public class Test4 {
-    public static void main(String[] args) {
-        int[] scores = {5,4,6,8,9,0,1,2,7,3};
-        int max = scores[0];
-        int min = scores[0];
-        int sum = 0;
-        for(int i = 0;i < scores.length;i++){
-            if(max < scores[i]){
-                max = scores[i];
-            }
-            if(min > scores[i]){
-                min = scores[i];
-            }
-            sum += scores[i];
-        }
-        double avg = (double)(sum - max - min) / (scores.length - 2);
-        System.out.println("选手去掉最高分和最低分之后的平均分为:" + avg);
-    }
-}

+ 0 - 41
JavaSE/day04/src/main/java/com/sf/Test5.java

@@ -1,41 +0,0 @@
-package com.sf;
-
-public class Test5 {
-    public static void main(String[] args) {
-        /**   动态初始化
-         * 数组存储的元素的数据类型[] 数组名字 = new 数组存储的元素的数据类型[长度];
-         * 或
-         * 数组存储的数据类型[] 数组名字;
-         * 数组名字 = new 数组存储的数据类型[长度];
-         */
-        int[] aa = new int[3];
-        int[] bb;
-        bb = new int[4];
-//        for (int i =0;i<aa.length;i++ ){
-//            aa[i]=1;
-//        }
-            aa[0]=1;
-            aa[1]=2;
-            aa[2]=3;
-        for (int i =0;i<aa.length;i++ ){
-            System.out.println(aa[i]);
-        }
-
-        /*
-        基本数据类型
-         */
-        int[] vv = new int[5];
-        for (int i =0;i<vv.length;i++){
-            System.out.println(vv[i]);
-        }
-
-
-        /**
-         * 包装类
-         */
-        Integer[] mm = new Integer[5];
-        for (int i =0;i<mm.length;i++){
-            System.out.println(mm[i]);
-        }
-    }
-}

+ 0 - 21
JavaSE/day04/src/main/java/com/sf/Test6.java

@@ -1,21 +0,0 @@
-package com.sf;
-
-public class Test6 {
-    public static void main(String[] args) {
-        int[][] aa={{12,14,24},{23,18,35},{33,48,25},{27,28,35}};
-
-        int sum = 0;
-        int time  = 0;
-        for (int i =0;i<aa.length;i++){
-            for (int j = 0; j<aa[i].length;j++){
-               int bb = aa[i][j];
-               sum += bb;
-               time++;
-            }
-        }
-        System.out.println("sum==="+sum);
-        System.out.println("time==="+time);
-        System.out.println("平均值==="+sum/time);
-    }
-
-}

+ 11 - 0
JavaSE/day05/day05.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>

+ 0 - 16
JavaSE/day05/pom.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.sf</groupId>
-    <artifactId>day05</artifactId>
-    <version>1.0-SNAPSHOT</version>
-
-    <properties>
-        <maven.compiler.source>8</maven.compiler.source>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
-</project>

+ 64 - 0
JavaSE/day05/src/com/lc/day05/arr/TestArr01.java

@@ -0,0 +1,64 @@
+package com.lc.day05.arr;
+
+/**
+ * ClassName: TestArr01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/18 9:58
+ * @Version 1.0
+ */
+public class TestArr01 {
+
+    public static void main(String[] args) {
+
+        //声明
+        int[][] arr1; // 推荐
+
+        //特别
+        int  arr2[][];
+
+        int[] arr3[];
+
+
+        //赋值
+        int[][] arr4 = new int[][]{
+                {1,2,3}, // 索引  0  小数组  0 1  2
+                {4,5,6,5,7},
+                {7,8,9}
+        };
+
+
+        //获取 第一个数组的第二个元素
+        System.out.println(arr4[0][1]); // 获取
+
+        //赋值
+        arr4[0][1] = 20;
+        System.out.println(arr4[0][1]);
+
+        //大数组的小数组 存储的是地址
+        System.out.println(arr4);
+
+        //小数组
+        System.out.println(arr4[0]);
+        System.out.println(arr4[1]);
+        System.out.println(arr4[2]);
+
+
+        //第二个数组的最后一个
+        int length = arr4[1].length;
+
+        System.out.println(arr4[1][length-1]); // 7
+
+
+        //遍历
+        for (int i = 0; i < arr4.length; i++) {
+            //System.out.println(arr4[i]);
+            //每一列
+            for (int k = 0; k < arr4[i].length; k++) {
+                System.out.print(arr4[i][k]+","); // 遍历
+            }
+            System.out.println();
+        }
+        
+    }
+}

+ 59 - 0
JavaSE/day05/src/com/lc/day05/arr/TestArr02.java

@@ -0,0 +1,59 @@
+package com.lc.day05.arr;
+
+/**
+ * ClassName: TestArr01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/18 9:58
+ * @Version 1.0
+ */
+public class TestArr02 {
+
+    public static void main(String[] args) {
+
+        //二维
+        //{ {1,2} {1,2,3} }
+        // 固定大数组的长度
+        int[][] arr1 = new int[3][];
+        // 长度3  小数组的元素个数 任意。
+
+        // 大数组长度和 小数组长度
+        int[][] arr2 = new int[3][3];
+
+        //小数组存储 3个元素
+
+        int[][] arr3 = new int[3][3];
+
+        arr3[1][2] = 44;
+
+        arr3[0][0] = 12;
+
+
+        for (int i = 0; i < arr3.length; i++) {
+            for (int k = 0; k < arr3[i].length; k++) {
+                System.out.print(" "+ arr3[i][k]);
+            }
+            System.out.println();
+        }
+        
+
+
+
+        int[][] arr4 = new int[3][];
+
+
+        //arr4[0][0] = 100; // ?  空指针
+
+        // 给大数组赋值。 小数组
+        // 创建小数组 赋值
+        int[] a = {1,2,3,4,5};
+        //静态赋值
+        arr4[0] = a;
+        //动态赋值
+        int[] b = new int[10];
+        arr4[1] = b;
+
+
+        
+    }
+}

+ 30 - 0
JavaSE/day05/src/com/lc/day05/arr1/TestArr01.java

@@ -0,0 +1,30 @@
+package com.lc.day05.arr1;
+
+import java.util.Arrays;
+
+/**
+ * ClassName: TestArr01
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/11/18 14:14
+ * @Version 1.0
+ */
+public class TestArr01 {
+
+    //数组的反转
+    public static void main(String[] args) {
+        int[] arr = {1,2,3,4,5,6,7};
+
+        for (int i = 0; i < arr.length / 2; i++) {
+            //交换
+            int temp = arr[i];
+            arr[i] = arr[arr.length-i-1];
+            arr[arr.length-i-1] = temp;
+        }
+
+        //输出
+        System.out.println(Arrays.toString(arr));
+    }
+
+
+}

部分文件因文件數量過多而無法顯示