xerga 2 years ago
commit
aa59b2d5e3
100 changed files with 2228 additions and 0 deletions
  1. 8 0
      JavaSE/.idea/.gitignore
  2. 6 0
      JavaSE/.idea/encodings.xml
  3. 36 0
      JavaSE/.idea/inspectionProfiles/Project_Default.xml
  4. 6 0
      JavaSE/.idea/misc.xml
  5. 13 0
      JavaSE/.idea/modules.xml
  6. 10 0
      JavaSE/.idea/runConfigurations.xml
  7. 124 0
      JavaSE/.idea/uiDesigner.xml
  8. 11 0
      JavaSE/JavaSE.iml
  9. 11 0
      JavaSE/day01/day01.iml
  10. 4 0
      JavaSE/day01/src/AAAA.java
  11. 24 0
      JavaSE/day01/src/HelloWorld.java
  12. 2 0
      JavaSE/day01/src/Student.java
  13. 7 0
      JavaSE/day01/src/com/lovcoding/day01/HelloWorld.java
  14. 11 0
      JavaSE/day02/day02.iml
  15. 28 0
      JavaSE/day02/src/com/lovcoding/day01/Test01_ChangLiang.java
  16. 64 0
      JavaSE/day02/src/com/lovcoding/day01/Test02_BianLiang.java
  17. 62 0
      JavaSE/day02/src/com/lovcoding/day01/Test03_YinShi.java
  18. 35 0
      JavaSE/day02/src/com/lovcoding/day01/Test04_XianShi.java
  19. 23 0
      JavaSE/day02/src/com/lovcoding/day01/Test05.java
  20. 11 0
      JavaSE/day03/day03.iml
  21. 66 0
      JavaSE/day03/src/com/lovecoding/day03/Test01_SuanShu.java
  22. 11 0
      JavaSE/day03/src/com/lovecoding/day03/Test02_SuanShu01.java
  23. 13 0
      JavaSE/day03/src/com/lovecoding/day03/Test03_SuanShu_GuanXi.java
  24. 64 0
      JavaSE/day03/src/com/lovecoding/day03/Test03_SuanShu_ex.java
  25. 43 0
      JavaSE/day03/src/com/lovecoding/day03/Test04_SuanShu_LuoJi.java
  26. 111 0
      JavaSE/day03/src/com/lovecoding/day03/Test05_SuanShu_ex02.java
  27. 20 0
      JavaSE/day03/src/com/lovecoding/day03/Test06_SuanShu_SanYuan.java
  28. 18 0
      JavaSE/day03/src/com/lovecoding/day03/Test07_SuanShu_SanYuan_ex.java
  29. 59 0
      JavaSE/day03/src/com/lovecoding/day03/Test08_SuanShu_WeiYunSuan.java
  30. 47 0
      JavaSE/day03/src/com/lovecoding/day03/Test09_SuanShu_WeiFuZhi.java
  31. 24 0
      JavaSE/day03/src/com/lovecoding/day03/Test10_IF01.java
  32. 29 0
      JavaSE/day03/src/com/lovecoding/day03/Test10_IF01_EX.java
  33. 44 0
      JavaSE/day03/src/com/lovecoding/day03/Test10_IF02_EX.java
  34. 25 0
      JavaSE/day03/src/com/lovecoding/day03/Test11_IFELSE01.java
  35. 30 0
      JavaSE/day03/src/com/lovecoding/day03/Test12_IfElseIfElse.java
  36. 11 0
      JavaSE/day04/day04.iml
  37. 41 0
      JavaSE/day04/src/com/lovcoding/day04/Test01IfQianTao.java
  38. 113 0
      JavaSE/day04/src/com/lovcoding/day04/Test01IfQianTaoEx.java
  39. 40 0
      JavaSE/day04/src/com/lovcoding/day04/Test02Switch.java
  40. 55 0
      JavaSE/day04/src/com/lovcoding/day04/Test03_Switch_Ex.java
  41. 30 0
      JavaSE/day04/src/com/lovcoding/day04/Test03_case.java
  42. 21 0
      JavaSE/day04/src/com/lovcoding/day04/Test03_case01.java
  43. 21 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_For.java
  44. 25 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_For01.java
  45. 46 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_For01_break.java
  46. 25 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_For_Ex.java
  47. 21 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_While.java
  48. 23 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_While01.java
  49. 25 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_While01_Ex.java
  50. 41 0
      JavaSE/day04/src/com/lovcoding/day04/Test04_While01_Ex01.java
  51. 27 0
      JavaSE/day04/src/com/lovcoding/day04/Test05_DoWhile01.java
  52. 23 0
      JavaSE/day04/src/com/lovcoding/day04/Test05_DoWhile02.java
  53. 20 0
      JavaSE/day04/src/com/lovcoding/day04/Test06_ForFor.java
  54. 12 0
      JavaSE/day04/src/com/lovcoding/day04/Test07_continue.java
  55. 11 0
      JavaSE/day07/day07.iml
  56. 7 0
      JavaSE/day07/src/com/lovecding/day07/ex01/Employee.java
  57. 9 0
      JavaSE/day07/src/com/lovecding/day07/ex01/MyDate.java
  58. 30 0
      JavaSE/day07/src/com/lovecding/day07/ex01/Test.java
  59. 49 0
      JavaSE/day07/src/com/lovecding/day07/ex02/MyInt.java
  60. 31 0
      JavaSE/day07/src/com/lovecding/day07/ex02/TestMax.java
  61. 21 0
      JavaSE/day07/src/com/lovecding/day07/ex02/TestMyInt.java
  62. 12 0
      JavaSE/day07/src/com/lovecding/day07/oop01/Student.java
  63. 17 0
      JavaSE/day07/src/com/lovecding/day07/oop01/TestStudent.java
  64. 4 0
      JavaSE/day07/src/com/lovecding/day07/oop02/Student.java
  65. 13 0
      JavaSE/day07/src/com/lovecding/day07/oop02/Test.java
  66. 6 0
      JavaSE/day07/src/com/lovecding/day07/oop03/Crcle.java
  67. 20 0
      JavaSE/day07/src/com/lovecding/day07/oop03/Person.java
  68. 15 0
      JavaSE/day07/src/com/lovecding/day07/oop03/TestCrcle.java
  69. 21 0
      JavaSE/day07/src/com/lovecding/day07/oop04/Crcle.java
  70. 15 0
      JavaSE/day07/src/com/lovecding/day07/oop04/TestCrcle.java
  71. 37 0
      JavaSE/day07/src/com/lovecding/day07/oop05/Circle.java
  72. 40 0
      JavaSE/day07/src/com/lovecding/day07/oop05/Mthod01.java
  73. 15 0
      JavaSE/day07/src/com/lovecding/day07/oop06/Emp.java
  74. 34 0
      JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams.java
  75. 30 0
      JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams2.java
  76. 33 0
      JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams3.java
  77. 26 0
      JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams4.java
  78. 5 0
      JavaSE/day07/src/com/lovecding/day07/oop06/MyDate.java
  79. 7 0
      JavaSE/day07/src/com/lovecding/day07/oop06/Person.java
  80. BIN
      JavaSE/out/production/day01/AAAA.class
  81. BIN
      JavaSE/out/production/day01/HelloWorld.class
  82. BIN
      JavaSE/out/production/day01/Student.class
  83. BIN
      JavaSE/out/production/day01/com/lovcoding/day01/HelloWorld.class
  84. BIN
      JavaSE/out/production/day02/com/lovcoding/day01/Test01_ChangLiang.class
  85. BIN
      JavaSE/out/production/day02/com/lovcoding/day01/Test02_BianLiang.class
  86. BIN
      JavaSE/out/production/day02/com/lovcoding/day01/Test03_YinShi.class
  87. BIN
      JavaSE/out/production/day02/com/lovcoding/day01/Test04_XianShi.class
  88. BIN
      JavaSE/out/production/day02/com/lovcoding/day01/Test05.class
  89. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test01_SuanShu.class
  90. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test02_SuanShu01.class
  91. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test03_SuanShu_GuanXi.class
  92. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test03_SuanShu_ex.class
  93. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test04_SuanShu_LuoJi.class
  94. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test05_SuanShu_ex02.class
  95. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test06_SuanShu_SanYuan.class
  96. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test07_SuanShu_SanYuan_ex.class
  97. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test08_SuanShu_WeiYunSuan.class
  98. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test09_SuanShu_WeiFuZhi.class
  99. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test10_IF01.class
  100. BIN
      JavaSE/out/production/day03/com/lovecoding/day03/Test10_IF01_EX.class

+ 8 - 0
JavaSE/.idea/.gitignore

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

+ 6 - 0
JavaSE/.idea/encodings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>

+ 36 - 0
JavaSE/.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,36 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="TOP_LEVEL_CLASS_OPTIONS">
+        <value>
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+          <option name="REQUIRED_TAGS" value="" />
+        </value>
+      </option>
+      <option name="INNER_CLASS_OPTIONS">
+        <value>
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+          <option name="REQUIRED_TAGS" value="" />
+        </value>
+      </option>
+      <option name="METHOD_OPTIONS">
+        <value>
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+          <option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
+        </value>
+      </option>
+      <option name="FIELD_OPTIONS">
+        <value>
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+          <option name="REQUIRED_TAGS" value="" />
+        </value>
+      </option>
+      <option name="IGNORE_DEPRECATED" value="false" />
+      <option name="IGNORE_JAVADOC_PERIOD" value="true" />
+      <option name="IGNORE_DUPLICATED_THROWS" value="false" />
+      <option name="IGNORE_POINT_TO_ITSELF" value="false" />
+      <option name="myAdditionalJavadocTags" value="date" />
+    </inspection_tool>
+  </profile>
+</component>

+ 6 - 0
JavaSE/.idea/misc.xml

@@ -0,0 +1,6 @@
+<?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>

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

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/JavaSE.iml" filepath="$PROJECT_DIR$/JavaSE.iml" />
+      <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$/day07/day07.iml" filepath="$PROJECT_DIR$/day07/day07.iml" />
+    </modules>
+  </component>
+</project>

+ 10 - 0
JavaSE/.idea/runConfigurations.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RunConfigurationProducerService">
+    <option name="ignoredProducers">
+      <set>
+        <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
+      </set>
+    </option>
+  </component>
+</project>

+ 124 - 0
JavaSE/.idea/uiDesigner.xml

@@ -0,0 +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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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>

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

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

+ 4 - 0
JavaSE/day01/src/AAAA.java

@@ -0,0 +1,4 @@
+public class AAAA {
+
+    public static final String STUDENT_NUMBER = "10011";
+}

+ 24 - 0
JavaSE/day01/src/HelloWorld.java

@@ -0,0 +1,24 @@
+/**
+ * HelloWorld 类
+ * @author cc
+ */
+public class HelloWorld {
+
+    String studentName;
+
+
+    //主函数
+    public static void main(String[] args) {
+        System.out.println("helloworld");
+    }
+
+
+    //  HelloWorld  代码案例 HelloWorld类
+
+    /*
+    *  关键字 public 表示公共的
+    *  main 主函数 程序入口
+    *
+    */
+
+}

+ 2 - 0
JavaSE/day01/src/Student.java

@@ -0,0 +1,2 @@
+public class Student {
+}

+ 7 - 0
JavaSE/day01/src/com/lovcoding/day01/HelloWorld.java

@@ -0,0 +1,7 @@
+package com.lovcoding.day01;
+
+public class HelloWorld {
+    public static void main(String[] args) {
+        System.out.println("123");
+    }
+}

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

+ 28 - 0
JavaSE/day02/src/com/lovcoding/day01/Test01_ChangLiang.java

@@ -0,0 +1,28 @@
+package com.lovcoding.day01;
+
+public class Test01_ChangLiang {
+
+    //psvm 生成主函数
+    public static void main(String[] args) {
+        //整数
+        System.out.println(123); //正整数
+        System.out.println(-123); //负整数
+        System.out.println(12345678910L); //默认是int 超出范围 加L 代表 long类型
+
+        //浮点
+        System.out.println(3.14);  //默认的double
+        System.out.println(3.14F); //float
+
+        //字符
+        //单引号包裹
+        System.out.println('中');
+
+        //布尔 true false
+        System.out.println(true);
+        System.out.println(false);
+
+        //字符串
+        System.out.println("hello world");
+        //快速复制一行  Ctrl+D   输出 sout
+    }
+}

+ 64 - 0
JavaSE/day02/src/com/lovcoding/day01/Test02_BianLiang.java

@@ -0,0 +1,64 @@
+package com.lovcoding.day01;
+
+public class Test02_BianLiang {
+
+
+    //psvm 生成主函数
+    public static void main(String[] args) {
+        //先声明,后使用
+        //System.out.println(a);
+        //int a = 10;
+
+        //int a ; //没有赋值
+        //System.out.println(a);
+
+        //作用域
+        int a = 10;
+        //int a = 20;
+        {
+            System.out.println(a);
+        }
+        //byte b = 128;
+
+
+    }
+
+    //psvm 生成主函数
+    public static void main1(String[] args) {
+        //变量声明  赋值  使用
+        // 8 基本数据类型
+        //整形
+        byte a = 127;
+        short b = 128;
+        int c = 12345;
+        long d = 12342342423423L; //超范围 int  加 L 大写
+        //浮点
+        float e = 1.234F; //float必须加 F
+        double f = 1.2342; //double 可以省略 D
+        //字符
+        char g = '国'; //单引号 只有一个字符
+        //布尔
+        boolean h= true;
+        //字符串
+        String str = "这是字符串";
+        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);
+        System.out.println(str);
+
+        System.out.println("---");
+        //变量可以重复赋值
+        int a1 = 10;
+        a1= 20;
+
+        //先声明后赋值
+        int a2 ;
+        a2 = 20;
+
+    }
+}

+ 62 - 0
JavaSE/day02/src/com/lovcoding/day01/Test03_YinShi.java

@@ -0,0 +1,62 @@
+package com.lovcoding.day01;
+
+public interface Test03_YinShi {
+
+    public static void main(String[] args) {
+        //byte  -> short  (char )-> int -> long -> float ->double  从小到大。
+
+        byte b = 127;
+        int i = b;
+        System.out.println(i);
+
+        int i1 = 123456;
+
+        float f1 = i1;
+        System.out.println(f1); //提升到浮点加上 .0
+
+        byte b1 = 120;
+        double d1 = b1;
+        System.out.println(d1);
+
+        //byte short  char
+        byte b2 = 127;
+        short s2 = b2; //byte 可以转化为 short
+
+        //byte char 不能转化
+        byte b3 = 12;
+        // char c3 = b3;
+
+        //char 和 short
+        short s4 = 128;
+        //char c4 = s4;
+
+        //总结  char 和 byte 和 short 不能 转化 byte和short可以转化
+
+        //char 和 int
+        char c5 = 'A'; //char 存储的ANSII 码   一个字符 对应的 数字
+        int i5 = c5;
+        System.out.println(i5); //65 = A   a = 97
+
+        //short int
+        short s6 = 128;
+        int i6 = s6;
+
+        // byte + byte 运算
+        byte b7 = 126;
+        byte b8 = 1;
+
+        //byte b9 = b7+b8; // 不能操作
+
+        byte b11 = 12;
+        short s11 = 12;
+
+        //  s111 = b11 + s11;
+        // char short byte 之间不能直接操作 必须通过 int
+
+        int a = 1;
+        int b111 = 2;
+        double result = a/b111;
+        System.out.println(result);
+
+    }
+}

+ 35 - 0
JavaSE/day02/src/com/lovcoding/day01/Test04_XianShi.java

@@ -0,0 +1,35 @@
+package com.lovcoding.day01;
+
+public interface Test04_XianShi {
+
+    public static void main(String[] args) {
+        //数据类型 变量 = (数据类型) 被转换的值。
+        //直接赋值
+        int i = (int) 3.1415;
+        System.out.println(i);//丢失精度
+
+        //变量赋值
+        int i2 = 128;
+        byte b = (byte) i2;
+        System.out.println(b); //溢出
+
+        //数据操作
+        int i11 = 100;
+        int i22 = 100;
+
+        short s11 =(short) (i11+i22); //没溢出
+        System.out.println(s11);
+
+        //int ->char
+        int i3 = 97;
+        char c3 = (char) i3;
+        System.out.println(c3); // ANSII 转换 int 正整数  转回 相反需要 数值转化字符
+
+        System.out.println((int)'你');
+        System.out.println((char)20320);
+
+
+        System.out.println((byte) 12345);
+
+    }
+}

+ 23 - 0
JavaSE/day02/src/com/lovcoding/day01/Test05.java

@@ -0,0 +1,23 @@
+package com.lovcoding.day01;
+
+public class Test05 {
+    public static void main(String[] args) {
+        //字符串转int
+        String s = "1234";
+        //Integer引用数据类型 parseInt方法
+        int i = Integer.parseInt(s);
+        System.out.println(i+1);
+
+        String s1 = "1234";
+        System.out.println(s1+1); //拼接
+
+        //int转字符串
+        int i1 = 10;
+
+        String s2 = i1+"";
+        System.out.println(s2+1);
+
+        //面试题
+        System.out.println(1+2+3+"4"+5+6); // + 号 做加法 做拼接作用
+    }
+}

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

+ 66 - 0
JavaSE/day03/src/com/lovecoding/day03/Test01_SuanShu.java

@@ -0,0 +1,66 @@
+package com.lovecoding.day03;
+
+public class Test01_SuanShu {
+    //算数运算符
+    public static void main(String[] args) {
+        //调用
+        method3();
+    }
+
+    //++ -- 复合使用
+    public static void method3(){
+        int a = 10;
+        int b = ++a; //先+1  10+1 = 11 在赋值给 b
+        System.out.println(b); // 11
+        System.out.println(a); // 11
+
+
+        int x = 10;
+        int y = x++; //先取值 x = 10 赋值 y = 10 之后在 x+1 = x = 11
+        System.out.println(y); // 10
+        System.out.println(x); // 11
+
+        System.out.println("----");
+        int c = 1;
+        c = c++;
+        System.out.println(c); // 1  等于过 2 最终 赋值 1;
+    }
+
+    //++ -- 单独使用
+    public static void method2(){
+        int a = 10;
+        ++a;
+        System.out.println(a);
+
+        int b = 10;
+        b++;
+        System.out.println(b);
+    }
+
+    //算数运算符 + - * /
+    public static void method1(){
+        System.out.println(3+3);  //6
+        System.out.println(3-3);  //0
+        System.out.println(3*3);  //9
+        System.out.println(3/3);  //1
+        System.out.println(10/3); //不是3.333 结果为整数
+        System.out.println(3/10); // 整数就是0
+
+
+        System.out.println(3%10); // 余数 3
+        System.out.println(10%3); // 余数 1
+
+
+        //加号作用
+        System.out.println("------------------");
+
+        System.out.println(3+4); //7
+        int a = 10;
+        int b = 20;
+        System.out.println(a+b); // 30
+
+        System.out.println(a+b+""+3); // 303
+        System.out.println(""+a+b);   //  1020
+        System.out.println(a+""+b);   //  1020
+    }
+}

+ 11 - 0
JavaSE/day03/src/com/lovecoding/day03/Test02_SuanShu01.java

@@ -0,0 +1,11 @@
+package com.lovecoding.day03;
+
+public class Test02_SuanShu01 {
+    //算数运算符
+    public static void main(String[] args) {
+        System.out.println("----");
+        int c = 1;
+        c = c++;
+        System.out.println(c); // 1  等于过 2 最终 赋值 1;
+    }
+}

+ 13 - 0
JavaSE/day03/src/com/lovecoding/day03/Test03_SuanShu_GuanXi.java

@@ -0,0 +1,13 @@
+package com.lovecoding.day03;
+
+public class Test03_SuanShu_GuanXi {
+    //关系运算符
+    public static void main(String[] args) {
+        System.out.println( 3 > 4); //F
+        System.out.println( 3 < 4); //T
+        System.out.println( 3 == 4); //F
+        System.out.println( 3 >= 4); //F
+        System.out.println( 3 <= 4); //T
+        System.out.println( 3 != 4); //T
+    }
+}

+ 64 - 0
JavaSE/day03/src/com/lovecoding/day03/Test03_SuanShu_ex.java

@@ -0,0 +1,64 @@
+package com.lovecoding.day03;
+
+public class Test03_SuanShu_ex {
+    //获取一个四位数的个位,十位,百位,千位
+    public static void main(String[] args) {
+        m5();
+
+    }
+
+    public static void m5(){
+        int i = 0; // 1  0
+        int result = ++i/--i;
+        System.out.println("result="+result);
+        //ArithmeticException: / by zero 1/0 异常
+    }
+
+    public static void m4(){
+        int i = 1;
+        // i = 1 2 3 4 5   j = 14
+        //      2     2     4     4
+        int j = ++i + i++ * ++i + i++;
+
+        System.out.println("i = " + i);
+        System.out.println("j = " + j);
+    }
+    public static void m3() {
+        int i = 1;
+        int j = i++;  //j=1 2 1  i=2 3 2
+        //    = 2   *   2  +  2 *  2
+        int k = i++ * ++j + --i *  j--;
+
+        System.out.println("i = " + i); //2
+        System.out.println("j = " + j); //1
+        System.out.println("k = " + k); //8
+    }
+
+    public static void m2() {
+        int i = 1;
+        int j = i++;  // j = 1  i=2
+        //  i取值2   i = 3
+        //  j取值2   j = 2
+        //  i取值4   i = 4
+        //  j取值2   j = 3
+        //  k = 2 * 2 + 4 * 2  = 12
+        int k = i++ * ++j + ++i * j++;
+
+        System.out.println("i = " + i); //4
+        System.out.println("j = " + j); //3
+        System.out.println("k = " + k); //12
+    }
+    public static void m1() {
+        int i = 1234; // 1230+4   // 123  //12
+
+
+        //ge
+        int ge = i % 10;
+
+        //shi
+        int shi = i/10%10;
+
+        System.out.println(ge);
+        System.out.println(shi);
+    }
+}

+ 43 - 0
JavaSE/day03/src/com/lovecoding/day03/Test04_SuanShu_LuoJi.java

@@ -0,0 +1,43 @@
+package com.lovecoding.day03;
+
+public class Test04_SuanShu_LuoJi {
+    //逻辑运算符
+    public static void main(String[] args) {
+        // & |
+        int a = 3 ,b = 4 , c = 5;
+
+        System.out.println(a>b & b<c ); // false true  // false
+        System.out.println(a<b & b<c ); // true true   // true
+
+        System.out.println(a>b | b<c ); // false true   //true
+        System.out.println(a<b | b<c ); // true true   // true
+        System.out.println(a>b | b>c ); // false false   // false
+
+        System.out.println(!(a>b));   //false  true
+        System.out.println(!(a<b));    //true  false
+
+        System.out.println(a>b ^ b<c ); // false true  // true
+        System.out.println(a<b ^ b<c ); // true true   // false
+
+        //短路&&
+        //左边出现false 右边不用执行
+        //短路||、
+        //左边出现true 右边不用执行
+
+        System.out.println("--------------");
+        int x = 10;
+        int y = 10;
+        //System.out.println(x!=y && x-- == 10 ); // false
+        System.out.println(x==10 && x-- == 10 ); // false
+        System.out.println(x);
+
+
+        System.out.println(10!=y || y-- == 10 ); // true
+        System.out.println(y);
+
+        System.out.println("-----------");
+        if (false){
+            System.out.println("1");
+        }
+    }
+}

+ 111 - 0
JavaSE/day03/src/com/lovecoding/day03/Test05_SuanShu_ex02.java

@@ -0,0 +1,111 @@
+package com.lovecoding.day03;
+
+public class Test05_SuanShu_ex02 {
+    //获取一个四位数的个位,十位,百位,千位
+    public static void main(String[] args) {
+        m4_1();
+
+    }
+
+    public static void m4_1 ()  {
+        boolean x = true;
+        boolean y = false;
+        short z = 42;
+
+        if(y=true)
+            if((z++==42)&&(y==true)) //true z=43
+                z++; // z=44
+
+
+        if((x=false) || (++z==45))  z++; //z=46
+
+        System. out.println("z="+z); //z=46
+    }
+
+
+    public static void m4(){
+        boolean x = true;
+        boolean y = false;
+        short z = 42;
+        // z=43 true  false  = false
+        if((z++==42)&&(y==true)) z++;
+        //false || false z=44
+        if((x=false) || (++z==45)) z++;
+
+        System. out.println("z="+z); //z = 44
+    }
+
+    public static void m3_3(){
+        int x = 1,y = 1;
+
+        if(x++==1 || ++y==1){ //x=2  true
+            x =7;
+        }
+        System.out.println("x="+x+",y="+y); //x=7  y=1
+
+    }
+
+    public static void m3_2(){
+        int x = 1,y = 1;
+
+        if(x++==1 | ++y==1){ // true x=2 false y=2
+            x =7;
+        }
+        System.out.println("x="+x+",y="+y); //x=7 y=2
+    }
+
+    public static void m3_1(){
+        int x = 1,y = 1;
+        //x = 1
+        if(x++==2 && ++y==2){
+            x =7;
+        }
+        System.out.println("x="+x+",y="+y); //x=2   y=1
+    }
+    public static void m3_0(){
+        int x = 1;
+        int y = 1;
+
+        if(x++==2 & ++y==2){ //false x=2  y=2
+            x =7;
+        }
+        System.out.println("x="+x+",y="+y); //x=2   y=2
+    }
+
+    public static void m2(){
+        int a = 1;
+        int b = 2;
+        int c = 0;
+        boolean flag = false;
+        if(flag=true){ // true
+            c = a++ + b; //执行
+            // a 取 1  a=2
+            // c = 1+2  = 3
+        }
+
+        if(flag=false){ // false
+            c = ++a - b;
+        }
+        System.out.println("a = " + a); //2
+        System.out.println("b = " + b); //2
+        System.out.println("c = " + c); //3
+    }
+    public static void m1(){
+        int a = 1;
+        int b = 2;
+        int c = 0;
+        boolean flag = false;
+        if(flag==true){
+            c = a++ + b; //不会执行
+        }
+
+        if(flag==false){ //true
+            c = ++a - b; //会执行
+            // a = 2  b = 2
+            // c = 0;
+        }
+        System.out.println("a = " + a); //2
+        System.out.println("b = " + b); //2
+        System.out.println("c = " + c); //0
+    }
+}

+ 20 - 0
JavaSE/day03/src/com/lovecoding/day03/Test06_SuanShu_SanYuan.java

@@ -0,0 +1,20 @@
+package com.lovecoding.day03;
+
+public class Test06_SuanShu_SanYuan {
+
+    public static void main(String[] args) {
+
+        int scoure = 59;
+
+        //格式  条件表达式 ? 结果1 : 结果2
+        boolean flag = (scoure >= 60) ? true : false;
+
+        System.out.println(flag);
+
+
+        System.out.println("----------");
+        byte a = 20;
+        int b = (true) ? a : 128;
+
+    }
+}

+ 18 - 0
JavaSE/day03/src/com/lovecoding/day03/Test07_SuanShu_SanYuan_ex.java

@@ -0,0 +1,18 @@
+package com.lovecoding.day03;
+
+public class Test07_SuanShu_SanYuan_ex {
+
+    public static void main(String[] args) {
+        //求三个整数的最大值
+        int a=65, b=21 ,c=22;
+
+//        int i = (a > b) ? a : b;
+//        int max = (i > c) ? i : c;
+//
+//        System.out.println(max);
+
+        //简写
+        int max = (((a > b) ? a : b) > c) ? ((a > b) ? a : b)  : c;
+        System.out.println(max);
+    }
+}

+ 59 - 0
JavaSE/day03/src/com/lovecoding/day03/Test08_SuanShu_WeiYunSuan.java

@@ -0,0 +1,59 @@
+package com.lovecoding.day03;
+
+public class Test08_SuanShu_WeiYunSuan {
+
+    public static void main(String[] args) {
+
+        // & 有0取0
+        // | 有1取1
+        // ~ 1变0 0变1
+        // ^ 1和0 取1
+        // << >> >>>
+        System.out.println(3&4); //0
+        // 0000 0011
+        // 0000 0100
+        // ---------
+        // 0000 0000
+        System.out.println(3|4); // 7
+        // 0000 0011
+        // 0000 0100
+        // ---------
+        // 0000 0111  7
+        System.out.println(~3); //-4
+        // 0000 0011 反
+        // 1111 1100 补码
+        // 1111 1011 反码
+        // 1000 0100 源码  -4
+        System.out.println(3^4); //7
+        // 0000 0011
+        // 0000 0100
+        // ---------
+        // 0000 0111  7
+
+        System.out.println(3>>1); //1
+        // 0000 0011
+        // 0000 0001  =1
+        System.out.println(3<<2); //12
+        // 0000 0011
+        // 0000 1100  = 12
+        System.out.println(-3>>2); //-1
+        // 1000 0011
+        System.out.println(-3<<2); //-12
+        // 0000 0011
+        System.out.println(3>>>2);
+        System.out.println(-3>>>2);
+        //1000 0011
+
+        //问 将2 变成8最快的方式?
+        //做移动 2位
+
+
+        // 2进制数字   0101010101001010010011
+        // 将后6位的结果取出? 0101010101001010010011 & 1111 11
+        // 01010101010010100100 11
+        //                 1111 11
+        //                 0100 11  = 19
+        // 转成10进制。
+
+    }
+}

+ 47 - 0
JavaSE/day03/src/com/lovecoding/day03/Test09_SuanShu_WeiFuZhi.java

@@ -0,0 +1,47 @@
+package com.lovecoding.day03;
+
+public class Test09_SuanShu_WeiFuZhi {
+    public static void main(String[] args) {
+        //赋值运算符
+        int a = 3,b=4,c=5;
+
+        System.out.println(a);
+        a +=6; //a = a+6
+        System.out.println(a);  //9
+
+        b*=8; //b=b*8
+        System.out.println(b); //32
+
+        /*
+            byte i =127;
+            i++;
+            sout(i) //?
+
+            short s = s + 10; 和 short s +=10; 两个结果一致么?会有问题?
+
+            byte a = 100;
+            a+=28;
+            sout(a) //?
+
+            思考 i+=10 和 i=i+10 区别?
+
+         */
+        System.out.println("-----------");
+
+        byte i =127;
+        i++;
+        System.out.println(i); // ++ 溢出强制转换
+
+        //short s = s + 10; 和 short s +=10; 两个结果一致么?会有问题?
+        short s = 2;
+        // s = s + 10; 编译错误  s = s + 10 s是short类型 10是int类型 结果应该是 int  所以编译错误。
+        s +=10;
+        // 实际用的 强制转换
+        // s = (short) (s + 10);
+        s = (short) (s + 10);
+
+        byte a1 = 100;
+        a1+=28;
+        System.out.println(a1); //强制转换
+    }
+}

+ 24 - 0
JavaSE/day03/src/com/lovecoding/day03/Test10_IF01.java

@@ -0,0 +1,24 @@
+package com.lovecoding.day03;
+
+import java.util.Scanner;
+
+public class Test10_IF01 {
+    // 键盘输入类使用步骤
+    // 导入包 import 创建Scanner对象
+    // 调用方法 获取输入值
+    // 关闭
+    public static void main(String[] args) {
+        //数据类型 变量 = new 数据类型(); //构造器
+        Scanner scanner = new Scanner(System.in);
+        //调用方法
+        //提示
+        System.out.println("请输入整数");
+        int i = scanner.nextInt(); //数字、
+        System.out.println(i);
+
+        System.out.println("请输入字符串");
+        String s1 = scanner.next();
+
+        System.out.println("s1="+s1);
+    }
+}

+ 29 - 0
JavaSE/day03/src/com/lovecoding/day03/Test10_IF01_EX.java

@@ -0,0 +1,29 @@
+package com.lovecoding.day03;
+
+import java.util.Scanner;
+
+public class Test10_IF01_EX {
+    public static void main(String[] args) {
+        // 两个数的比较
+        // 从键盘输入两个数,比较大小。
+        // Scanner 获取键盘输入
+        Scanner scanner = new Scanner(System.in);
+
+        System.out.println("请输入第一个数字");
+        int number1 = scanner.nextInt();
+        System.out.println("请输入第二个数字");
+        int number2 = scanner.nextInt();
+
+        //比较
+        if (number1 > number2){
+            System.out.println("大的数字是number1="+number1);
+        }
+
+        if (number1 < number2){
+            System.out.println("大的数字是number2="+number2);
+        }
+
+        //关闭
+        scanner.close();
+    }
+}

+ 44 - 0
JavaSE/day03/src/com/lovecoding/day03/Test10_IF02_EX.java

@@ -0,0 +1,44 @@
+package com.lovecoding.day03;
+
+public class Test10_IF02_EX {
+    public static void main(String[] args) {
+        //两个数字的交互
+        int a=10;
+        int b=20;
+
+        System.out.println("a="+a);
+        System.out.println("b="+b);
+        //交换 **
+        //声明临时变量
+        int temp = a;
+        a = b;
+        b = temp;
+
+        System.out.println("交换之后");
+        System.out.println("a="+a);
+        System.out.println("b="+b);
+
+        int x=10;
+        int y=20;
+        //加减法 可能溢出
+        int i = x + y;
+        x = i - x;
+        y = i - x;
+        System.out.println("交换之后");
+        System.out.println("x="+x);
+        System.out.println("y="+y);
+
+
+        //亦或 ^
+        int e =10;
+        int f =20;
+
+        int i1 = e + f;
+        e = i1 ^ e; //
+        f = i1 ^ e;
+
+        System.out.println(e);
+        System.out.println(f);
+
+    }
+}

+ 25 - 0
JavaSE/day03/src/com/lovecoding/day03/Test11_IFELSE01.java

@@ -0,0 +1,25 @@
+package com.lovecoding.day03;
+
+import java.util.Scanner;
+
+public class Test11_IFELSE01 {
+    public static void main(String[] args) {
+        //Scanner
+        Scanner scanner = new Scanner(System.in);
+
+        System.out.println("请输入整数");
+        int number = scanner.nextInt();
+
+        //判断
+        if (number % 2 == 0){
+            //true执行 是偶数
+            System.out.println(number+":是偶数");
+        }else{
+            //false执行 是奇数
+            System.out.println(number+":是奇数");
+        }
+        scanner.close();
+        // (i % 4 == 0 i % 100 != 0)  ||  i%400
+        //  0 < x < 100   用 && 链接
+    }
+}

+ 30 - 0
JavaSE/day03/src/com/lovecoding/day03/Test12_IfElseIfElse.java

@@ -0,0 +1,30 @@
+package com.lovecoding.day03;
+
+import java.util.Scanner;
+
+public class Test12_IfElseIfElse {
+    public static void main(String[] args) {
+       /*
+       代码 根据成绩 输出对应优良中差 不及格
+        优秀  90-100
+        良好  80-90
+        中等  70-80
+        差      60-70
+        不及格  60以下
+        */
+        Scanner scanner = new Scanner(System.in);
+        int number = scanner.nextInt();
+        if ( number>90 && number<=100 ){
+            System.out.println("优秀");
+        }else if (number>80 && number<=90){
+            System.out.println("良好");
+        }else if (number>70 && number<=80){
+            System.out.println("中等");
+        }else if (number>60 && number<=70){
+            System.out.println("差");
+        }else{
+            System.out.println("不及格");
+        }
+
+    }
+}

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

+ 41 - 0
JavaSE/day04/src/com/lovcoding/day04/Test01IfQianTao.java

@@ -0,0 +1,41 @@
+package com.lovcoding.day04;
+
+import java.util.Scanner;
+
+public class Test01IfQianTao {
+    public static void main(String[] args) {
+ /*
+       代码 根据成绩 输出对应优良中差 不及格
+        优秀  90-100
+        良好  80-90
+        中等  70-80
+        差      60-70
+        不及格  60以下
+*/
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入1-100之间的整数");
+        int number = scanner.nextInt();
+
+        if( 0 <= number && number <= 100 ){
+            if ( number>90 && number<=100 ){
+                System.out.println("优秀");
+            }else if (number>80 && number<=90){
+                System.out.println("良好");
+            }else if (number>70 && number<=80){
+                System.out.println("中等");
+            }else if (number>60 && number<=70){
+                System.out.println("差");
+            }else{
+                System.out.println("不及格");
+            }
+        }else{
+            System.out.println("输入错误!!");
+        }
+
+
+        System.out.println("-----------------");
+        if (false)
+            System.out.println(1);
+        System.out.println(2);
+    }
+}

+ 113 - 0
JavaSE/day04/src/com/lovcoding/day04/Test01IfQianTaoEx.java

@@ -0,0 +1,113 @@
+package com.lovcoding.day04;
+
+import java.util.Scanner;
+
+public class Test01IfQianTaoEx {
+    public static void main(String[] args) {
+        int n1 = 3;
+        int n2 = 2;
+        int n3 = 1;
+
+        System.out.println("n1="+n1+" n2="+n2+" n3="+n3);
+
+        // n1 > n2  交换 小的放前面
+        if (n1 > n2){
+            int temp = n1;
+            n1 = n2;
+            n2 = temp;
+        }
+        System.out.println("n1="+n1+" n2="+n2+" n3="+n3);
+
+        if (n2 > n3){
+            int temp = n2;
+            n2 = n3;
+            n3 = temp;
+        }
+        System.out.println("n1="+n1+" n2="+n2+" n3="+n3);
+
+        if (n1 > n2){
+            int temp = n1;
+            n1 = n2;
+            n2 = temp;
+        }
+        System.out.println("n1="+n1+" n2="+n2+" n3="+n3);
+
+    }
+    public static void main_b(String[] args) {
+        //提示
+        //三个数排序  6中情况
+        /*
+            数字
+            n1 n2 n3
+
+            n1 < n2 < n3
+            n1 < n3 < n2
+
+            n2 < n1 < n3
+            n2 < n3 < n1
+
+            n3 < n2 < n1
+            n3 < n1 < n2
+
+            输出语句 6个
+         */
+        Scanner s = new Scanner(System.in);
+
+        System.out.println("请输入");
+        int n1 = s.nextInt();
+        int n2 = s.nextInt();
+        int n3 = s.nextInt();
+
+        if (n1<n2){
+            if (n2<n3){
+                System.out.println(321);
+            }else {
+                if (n1 < n3 ){
+                    System.out.println(132);
+                }else {
+                    System.out.println(132);
+                }
+            }
+        }
+    }
+
+    public static void main_a(String[] args) {
+        //提示
+        //三个数排序  6中情况
+        /*
+            数字
+            n1 n2 n3
+
+            n1 < n2 < n3
+            n1 < n3 < n2
+
+            n2 < n1 < n3
+            n2 < n3 < n1
+
+            n3 < n2 < n1
+            n3 < n1 < n2
+
+            输出语句 6个
+         */
+        Scanner s = new Scanner(System.in);
+
+        System.out.println("请输入");
+        int n1 = s.nextInt();
+        int n2 = s.nextInt();
+        int n3 = s.nextInt();
+
+        if (n1 < n2 && n2 < n3){
+            System.out.println(n1 +"<"+ n2 +"<"+ n3);
+        }else if (n1 < n3 && n3< n2){
+            System.out.println(n1 +"<"+ n3 +"<"+ n2);
+        }else if (n2 < n1 && n1 < n3){
+            System.out.println(n2 +"<"+ n1 +"<"+ n3);
+        }else if (n2 < n3 && n3< n1){
+            System.out.println(n2 +"<"+ n3 +"<"+ n1);
+        }else if (n3 < n2 && n2< n1){
+            System.out.println(n3 +"<"+ n2 +"<"+ n1);
+        }else if (n3 < n1 && n1< n2){
+            System.out.println(n3 +"<"+ n1 +"<"+ n2);
+        }
+    }
+}

+ 40 - 0
JavaSE/day04/src/com/lovcoding/day04/Test02Switch.java

@@ -0,0 +1,40 @@
+package com.lovcoding.day04;
+
+import java.util.Scanner;
+
+public class Test02Switch {
+    public static void main(String[] args) {
+        //switch case
+        // 根据输入的数字 显示对应的星期几。
+        Scanner s = new Scanner(System.in);
+        System.out.println("请输入");
+        int number = s.nextInt();
+        //表达式
+        switch (number){
+            case 1:
+                System.out.println("星期一");
+                break;
+            case 2:
+                System.out.println("星期二");
+                break;
+            case 3:
+                System.out.println("星期二");
+                break;
+            case 4:
+                System.out.println("星期四");
+                break;
+            case 5:
+                System.out.println("星期五");
+                break;
+            case 6:
+                System.out.println("星期六");
+                break;
+            case 7:
+                System.out.println("星期日");
+                break;
+            default:
+                System.out.println("输入有误!!");
+                break;
+        }
+    }
+}

+ 55 - 0
JavaSE/day04/src/com/lovcoding/day04/Test03_Switch_Ex.java

@@ -0,0 +1,55 @@
+package com.lovcoding.day04;
+
+public class Test03_Switch_Ex {
+    public static void main(String[] args) {
+       /*
+       用year ,month ,day 分别表示 年月日。 定义 2023 年 12月  26日,最后算出 2023 年 8月  26日是今年的第几天。
+        提示
+            判断闰年的标准
+            (1)要么能被4整除,同时不能被100整除
+            (2)要么能被400整除
+
+            选择 Switch 1,3,5,7,8,10,12 31天   2 闰年 28   4,6,9,11 30天 运算符 +=
+        */
+        int year = 2000;
+        int month = 12;
+        int day = 31;
+
+        //累加 闰年
+        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;
+                if ( year % 4 == 0 && year %100 == 0  || year % 400 ==0){
+                    days++;
+                }
+            case 2:
+                days += 31;
+            case 1:
+                days += day; //month 的day 天数
+                break;
+            default:
+                System.out.println("输入有误");
+                break;
+        }
+        System.out.println(year+" 年 "+month+"月  "+day+"日一共是"+days+"天");
+    }
+}

+ 30 - 0
JavaSE/day04/src/com/lovcoding/day04/Test03_case.java

@@ -0,0 +1,30 @@
+package com.lovcoding.day04;
+
+import java.util.Random;
+
+public class Test03_case {
+    public static void main(String[] args) {
+        //根据输入的值输出季节
+        Random random = new Random();
+//        int month = random.nextInt(12) + 1; //nextInt(10) 生成 0-9 +1
+        int month = -1;
+        System.out.println(month);
+        switch (month){ //14 以上
+            default:
+                System.out.println("输入有误!!");
+                //break;
+            case 12,1,2:
+                System.out.println("冬季");
+                break;
+            case 3,4,5:
+                System.out.println("春季");
+                break;
+            case 6,7,8:
+                System.out.println("夏季");
+                break;
+            case 9,10,11:
+                System.out.println("秋季");
+                break;
+        }
+    }
+}

+ 21 - 0
JavaSE/day04/src/com/lovcoding/day04/Test03_case01.java

@@ -0,0 +1,21 @@
+package com.lovcoding.day04;
+
+public class Test03_case01 {
+    public static void main(String[] args) {
+        //switch case
+        // case 匹配值可以是那些类型
+        // String number = "1";
+        // long number = 1;
+         char number = 'A';
+        // 可以匹配的数据类型 分别是 int byte short String 枚举类型
+        //表达式
+        switch (number){
+            case 'A':
+                System.out.println("星期一");
+                break;
+            default:
+                System.out.println("输入有误!!");
+                break;
+        }
+    }
+}

+ 21 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_For.java

@@ -0,0 +1,21 @@
+package com.lovcoding.day04;
+
+public class Test04_For {
+    public static void main(String[] args) {
+        //格式
+        // 循环输出 10边 hello world
+        // 编号
+        for ( int i = 1; i <= 10 ; i++  ){
+            System.out.println("第"+i+"次输出 hello world");
+        }
+
+        //打印 1-100之间的偶数
+        //循环1-100;
+        for (int i = 1; i <= 100; i++) {
+            //判断
+            if(i % 2 ==0){
+                System.out.println("偶数是"+i);
+            }
+        }
+    }
+}

+ 25 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_For01.java

@@ -0,0 +1,25 @@
+package com.lovcoding.day04;
+
+public class Test04_For01 {
+    public static void main(String[] args) {
+        //作用域
+        int i = 1;
+
+        //在for循环中可以使用 i
+        for (int j = 0 ; j < 10; j++ ) {
+            System.out.println(j);
+            System.out.println(i);
+        }
+        //外部不能使用j
+        //System.out.println(j);
+
+
+        //死循环
+        for (;;){
+            System.out.println("123");
+        }
+        //System.out.println(1);
+
+
+    }
+}

+ 46 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_For01_break.java

@@ -0,0 +1,46 @@
+package com.lovcoding.day04;
+
+import java.util.Random;
+
+public class Test04_For01_break {
+    public static void main(String[] args) {
+        // break 停止 结束
+        // 用在循环中
+        for (int i = 0; i < 100; i++) {
+            if (i == 3){
+                break;
+            }else{
+                System.out.println(i);
+            }
+        }
+
+        System.out.println("--------");
+        //声明一个随机数,判断当前随机数是否是质数(只能被1和本省整除的数字)
+        //举例  7   比如7%1 = 7    7%2=1 一直到 本身 7%7 =0 。其他都不能被整除,就是质数。
+
+        //生成随机数
+        Random random = new Random();
+        int number = random.nextInt(100); // 8
+
+        System.out.println(number);
+        //标识位
+        boolean flag = true;
+        // 7% 2-6 没有等于0 确定 是 质数
+        for ( int i = 2; i < number ; i++ ){
+            if (number % i == 0){
+                flag = false;
+                //第一次就发现不是质数后面不需要验证了
+                //停止
+                break;
+            }
+        }
+        //看标志位
+        if (flag){
+            System.out.println(number+"是质数");
+        }else{
+            System.out.println(number+"不是质数");
+        }
+
+
+    }
+}

+ 25 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_For_Ex.java

@@ -0,0 +1,25 @@
+package com.lovcoding.day04;
+
+public class Test04_For_Ex {
+    public static void main(String[] args) {
+        //输出50-100之间的奇数
+        for (int i = 50; i <=100 ; i++) {
+            if ( i%2 != 0 ){
+                System.out.println(i);
+            }
+        }
+
+        System.out.println("--------------------");
+        //所谓水仙花数是指一个3位数,其各个位上数字立方和等于其本身。
+        // 例如: 153 = 1\*1\*1 + 5\*5\*5 + 3\*3\*3,找出所有的水仙花数,并统计他们有几个。
+        for (int i = 100; i < 1000 ; i++) {
+            int ge = i % 10;
+            int shi = i / 10 % 10;
+            int bai = i / 100;
+            // i = ge*ge*ge + shi*shi*shi +bai*bai*bai
+            if ( i ==  ge*ge*ge + shi*shi*shi +bai*bai*bai ){
+                System.out.println("水仙花数是:"+i);
+            }
+        }
+    }
+}

+ 21 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_While.java

@@ -0,0 +1,21 @@
+package com.lovcoding.day04;
+
+public class Test04_While {
+    public static void main(String[] args) {
+        // 1-100之间 偶数的和
+        int sum = 0;
+        //格式
+        int i = 1;
+        //判断
+        while ( i <= 100){
+            //循环体
+            if (i %2 == 0){
+                sum+=i;
+            }
+            //迭代
+            i++;
+        }
+
+        System.out.println("和是"+sum);
+    }
+}

+ 23 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_While01.java

@@ -0,0 +1,23 @@
+package com.lovcoding.day04;
+
+import java.util.Scanner;
+
+public class Test04_While01 {
+    public static void main(String[] args) {
+        //输入的数字必须是1-100;不是 提示 重新输入一直到输入正确。
+
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入1-100");
+        //循环
+        while (true){
+            int number = scanner.nextInt();
+            //判断
+            if ( number > 0 &&  number <= 100 ){
+                System.out.println("输入正确="+number);
+                break;
+            }else{
+                System.out.println("输入错误,请输入1-100");
+            }
+        }
+    }
+}

+ 25 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_While01_Ex.java

@@ -0,0 +1,25 @@
+package com.lovcoding.day04;
+
+public class Test04_While01_Ex {
+    public static void main(String[] args) {
+        //从1循环到150并在每行打印一个值,另外在每个
+        // 3的倍数行上打印出“foo”,在每个5的倍数行上打印“biz”,在每个7的倍数行上打印输出“baz”。例如:
+        int i = 1;
+        while ( i <= 150){
+            if (i % 3 == 0){
+                System.out.print("foo ");
+            }
+            if (i % 5 == 0){
+                System.out.print("biz ");
+            }
+            if (i % 7 == 0){
+                System.out.print("baz ");
+            }
+
+            //迭代
+            i++;
+            System.out.println();
+        }
+
+    }
+}

+ 41 - 0
JavaSE/day04/src/com/lovcoding/day04/Test04_While01_Ex01.java

@@ -0,0 +1,41 @@
+package com.lovcoding.day04;
+
+public class Test04_While01_Ex01 {
+    public static void main(String[] args) {
+        //输入两个正整数m和n,求其最大公约数和最小公倍数
+        //  m=6  n=8
+        //  最大公约 小于等于  m和n的最小值。
+        //  最小值-- 往下找。 符合直接 break
+
+        //  最小公倍 大于等于  m和n的最大值。
+        //  从m和n的最大值 一直到 m*n的值。
+        //  从最大值 向上找
+
+        int m = 6;
+        int n = 8;
+
+
+        //最大公约
+        int min = m < n ? m : n;
+        //条件
+        while (min > 0 ){
+            //取模
+            if (m % min == 0 && n % min == 0){
+                System.out.println("最大公约数是:"+min);
+                break;
+            }
+            min--;
+        }
+
+        //最小公倍数
+        int max = m > n ? m : n;
+
+        while ( max <= m*n ){
+            if (max % m == 0 && max % n == 0){
+                System.out.println("最小公倍数是:"+max);
+                break;
+            }
+            max++;
+        }
+    }
+}

+ 27 - 0
JavaSE/day04/src/com/lovcoding/day04/Test05_DoWhile01.java

@@ -0,0 +1,27 @@
+package com.lovcoding.day04;
+
+import java.util.Random;
+import java.util.Scanner;
+
+public class Test05_DoWhile01 {
+    public static void main(String[] args) {
+        //猜数字
+        Random random = new Random();
+        int number = random.nextInt(5);
+        //限制次数
+        int count = 3;
+        //输入
+        Scanner scanner = new Scanner(System.in);
+        //格式
+        do {
+            System.out.println("请输入1-5");
+            int i = scanner.nextInt();
+            if ( i == number){
+                System.out.println("猜对了");
+                break;
+            }
+            //猜测次数 -1
+            count--;
+        }while (count > 0);
+    }
+}

+ 23 - 0
JavaSE/day04/src/com/lovcoding/day04/Test05_DoWhile02.java

@@ -0,0 +1,23 @@
+package com.lovcoding.day04;
+
+import java.util.Random;
+import java.util.Scanner;
+
+public class Test05_DoWhile02 {
+    public static void main(String[] args) {
+        //猜数字
+        Random random = new Random();
+        int number = random.nextInt(10);
+        //输入
+        Scanner scanner = new Scanner(System.in);
+        //格式
+        do {
+            System.out.println("请输入1-5");
+            int i = scanner.nextInt();
+            if ( i == number){
+                System.out.println("猜对了");
+                break;
+            }
+        }while (true);
+    }
+}

+ 20 - 0
JavaSE/day04/src/com/lovcoding/day04/Test06_ForFor.java

@@ -0,0 +1,20 @@
+package com.lovcoding.day04;
+
+public class Test06_ForFor {
+    public static void main(String[] args) {
+        //双层循环
+        /*
+         * * * * *
+         * * * * *
+         * * * * *
+         * * * * *
+         * * * * *
+         */
+        for (int i = 0; i < 5; i++) {
+            for (int j = 0; j < 5; j++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+    }
+}

+ 12 - 0
JavaSE/day04/src/com/lovcoding/day04/Test07_continue.java

@@ -0,0 +1,12 @@
+package com.lovcoding.day04;
+
+public class Test07_continue {
+    public static void main(String[] args) {
+        for (int i = 0; i < 10; i++) {
+            if ( i == 3){
+                continue;
+            }
+            System.out.println(i);
+        }
+    }
+}

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

+ 7 - 0
JavaSE/day07/src/com/lovecding/day07/ex01/Employee.java

@@ -0,0 +1,7 @@
+package com.lovecding.day07.ex01;
+
+public class Employee {
+
+    String name;
+    MyDate myDate;
+}

+ 9 - 0
JavaSE/day07/src/com/lovecding/day07/ex01/MyDate.java

@@ -0,0 +1,9 @@
+package com.lovecding.day07.ex01;
+
+public class MyDate {
+
+    int year;
+    int month;
+    int day;
+
+}

+ 30 - 0
JavaSE/day07/src/com/lovecding/day07/ex01/Test.java

@@ -0,0 +1,30 @@
+package com.lovecding.day07.ex01;
+
+public class Test {
+
+
+    public static void main(String[] args) {
+
+        //创建 emp
+        Employee employee1 = new Employee();
+        employee1.name = "zs";
+        //myDate 类型 MyDate
+        MyDate myDate = new MyDate();
+        //设置
+        myDate.year = 2000;
+        myDate.month = 12;
+        myDate.day = 31;
+
+        Employee employee2 = new Employee();
+        employee2.name = "kunkun";
+        //对象赋值
+        employee1.myDate = myDate;
+        MyDate myDate1 = new MyDate();
+        //设置
+        myDate1.year = 2002;
+        myDate1.month = 11;
+        myDate1.day = 22;
+        employee2.myDate = myDate1;
+
+    }
+}

+ 49 - 0
JavaSE/day07/src/com/lovecding/day07/ex02/MyInt.java

@@ -0,0 +1,49 @@
+package com.lovecding.day07.ex02;
+
+public class MyInt {
+    int value;
+
+    //是否是自然数
+    boolean isNatural(){
+        if (value >= 0){
+            return true;
+        }
+        return false;
+    }
+    //约数个数
+    int approximateNumberCount(){
+        //计数
+        int count = 0;
+        for (int i = 1; i <= value; i++) {
+            if (value % i == 0){
+                count++;
+            }
+        }
+        //个数
+        return count;
+    }
+    //是否是素数
+    boolean isPrimeNumber(){
+        if (approximateNumberCount() == 2){
+            return true;
+        }
+        return false;
+    }
+
+    int[] getAllPrimeNumber(){
+        //创建数组
+        int[] arr = new int[approximateNumberCount()];
+        //填入
+        int index=0;
+        //循环
+        for (int i = 1; i <= value; i++) {
+            if (value % i == 0){
+                arr[index] = i;
+                index++;
+            }
+        }
+        return arr;
+    }
+
+
+}

+ 31 - 0
JavaSE/day07/src/com/lovecding/day07/ex02/TestMax.java

@@ -0,0 +1,31 @@
+package com.lovecding.day07.ex02;
+
+public class TestMax {
+
+    //(1)声明方法int min(int a, int b , int c):返回3个整数中的最小值
+    public int min(int a, int b , int c){
+        int min = (a > b ? b : a) > c ? c :(a > b ? b : a);
+        return min;
+    }
+    //(2)声明方法int max(int a, int b , int c):返回3个整数的最大值
+    //(2)声明方法int max(int[] arr ):返回数组中的最大值
+    public int max(int[] arr ){
+        int max = arr[0];
+        for (int i = 0; i < arr.length; i++) {
+            if (arr[i]> max) {
+                max = arr[i];
+            }
+        }
+        return max;
+    }
+
+    public static void main(String[] args) {
+        TestMax testMax = new TestMax();
+        int min = testMax.min(9, 5, 8);
+        System.out.println(min);
+
+        int[] arr = {11,4,5,6};
+        System.out.println(testMax.max(arr));
+    }
+
+}

+ 21 - 0
JavaSE/day07/src/com/lovecding/day07/ex02/TestMyInt.java

@@ -0,0 +1,21 @@
+package com.lovecding.day07.ex02;
+
+import java.util.Arrays;
+
+public class TestMyInt {
+
+    public static void main(String[] args) {
+        MyInt myInt = new MyInt();
+
+        myInt.value = 7;
+
+        int i = myInt.approximateNumberCount();
+        System.out.println(i);
+
+        boolean primeNumber = myInt.isPrimeNumber();
+        System.out.println(primeNumber);
+
+        int[] allPrimeNumber = myInt.getAllPrimeNumber();
+        System.out.println(Arrays.toString(allPrimeNumber));
+    }
+}

+ 12 - 0
JavaSE/day07/src/com/lovecding/day07/oop01/Student.java

@@ -0,0 +1,12 @@
+package com.lovecding.day07.oop01;
+
+public class Student {
+    //属性 名称
+    String name;
+    //年龄
+    int age;
+    //行为
+    public void sayHello(){
+        System.out.println("hello");
+    }
+}

+ 17 - 0
JavaSE/day07/src/com/lovecding/day07/oop01/TestStudent.java

@@ -0,0 +1,17 @@
+package com.lovecding.day07.oop01;
+
+public class TestStudent {
+    public static void main(String[] args) {
+        //创建对象
+        Student student = new Student();
+
+        //输出 Student@4eec7777 对象地址
+        System.out.println(student);
+
+        //调用方法
+        student.sayHello();
+
+        //调用属性
+        System.out.println(student.age); //默认值
+    }
+}

+ 4 - 0
JavaSE/day07/src/com/lovecding/day07/oop02/Student.java

@@ -0,0 +1,4 @@
+package com.lovecding.day07.oop02;
+
+public class Student {
+}

+ 13 - 0
JavaSE/day07/src/com/lovecding/day07/oop02/Test.java

@@ -0,0 +1,13 @@
+package com.lovecding.day07.oop02;
+
+public class Test {
+
+    public static void main(String[] args) {
+        //没有前缀就是 声明的
+        Student student = new Student();
+
+        // 明确指定的类
+        com.lovecding.day07.oop02.Student student1 = new com.lovecding.day07.oop02.Student();
+
+    }
+}

+ 6 - 0
JavaSE/day07/src/com/lovecding/day07/oop03/Crcle.java

@@ -0,0 +1,6 @@
+package com.lovecding.day07.oop03;
+
+public class Crcle {
+    //成员变量
+    public double r;
+}

+ 20 - 0
JavaSE/day07/src/com/lovecding/day07/oop03/Person.java

@@ -0,0 +1,20 @@
+package com.lovecding.day07.oop03;
+
+public class Person {
+
+    //类
+    Crcle crcle;
+    int i;
+    boolean flag;
+    char c;
+    int[] arr;
+
+    public static void main(String[] args) {
+        Person person = new Person();
+        System.out.println(person.crcle);
+        System.out.println(person.i);
+        System.out.println(person.flag);
+        System.out.println(person.c);
+        System.out.println(person.arr);
+    }
+}

+ 15 - 0
JavaSE/day07/src/com/lovecding/day07/oop03/TestCrcle.java

@@ -0,0 +1,15 @@
+package com.lovecding.day07.oop03;
+
+public class TestCrcle {
+    public static void main(String[] args) {
+        //对象
+        Crcle crcle = new Crcle();
+        Crcle crcle2 = new Crcle();
+
+        //赋值
+        crcle.r = 20;
+        //输出
+        System.out.println(crcle.r); //20
+        System.out.println(crcle2.r); //0.0
+    }
+}

+ 21 - 0
JavaSE/day07/src/com/lovecding/day07/oop04/Crcle.java

@@ -0,0 +1,21 @@
+package com.lovecding.day07.oop04;
+
+public class Crcle {
+    //成员变量
+    public double r;
+
+    //位置
+    //定义的方法
+    // 没有返回值 没有参数
+    public void getRadio(){
+        System.out.println(r); //半径
+    }
+
+    public void getZhouChang(){
+        System.out.println(Math.PI * r); //周长
+    }
+
+    public void getArea(){
+        System.out.println(Math.PI * r * r ); //面积
+    }
+}

+ 15 - 0
JavaSE/day07/src/com/lovecding/day07/oop04/TestCrcle.java

@@ -0,0 +1,15 @@
+package com.lovecding.day07.oop04;
+
+public class TestCrcle {
+    public static void main(String[] args) {
+        //对象
+        Crcle crcle = new Crcle();
+        //赋值
+        crcle.r = 20;
+        //输出
+        System.out.println(crcle.r); //20
+
+        //调用getArea
+        crcle.getArea();
+    }
+}

+ 37 - 0
JavaSE/day07/src/com/lovecding/day07/oop05/Circle.java

@@ -0,0 +1,37 @@
+package com.lovecding.day07.oop05;
+
+public class Circle {
+    public double r;
+    /**
+     * @return 面积
+     */
+    public double area(){
+        return Math.PI*r*r; //返回值具体数据 是double类
+    }
+    /**
+     * @return 周长
+     */
+    public double perimeter(){
+        return 2*Math.PI*r;
+    }
+    public String getInfo(){
+        return "半径"+r+",周长"+perimeter()+"面积"+area();
+    }
+    //提示
+    public void setR( double r1 ){
+        r = r1;
+        // 年月日 三次赋值
+    }
+    public static void main(String[] args) {
+        Circle c1 = new Circle();
+        c1.r = 10;
+        System.out.println(c1.getInfo());
+        Circle c2 = new Circle();
+        c2.r = 20;
+        double area = c2.area();
+        System.out.println("c2 面积是"+area);
+
+        System.out.println(c2.getInfo());
+
+    }
+}

+ 40 - 0
JavaSE/day07/src/com/lovecding/day07/oop05/Mthod01.java

@@ -0,0 +1,40 @@
+package com.lovecding.day07.oop05;
+
+public class Mthod01 {
+
+    //无返回值无参数
+    public void m1(){
+        System.out.println("无返回值无参数");
+    }
+
+    //无返回值有参数
+    public void m2(int i){
+        System.out.println("无返回值有参数,参数值是"+i);
+    }
+
+    //有返回值无参数
+    public int m3(){
+        int i = 10;
+        System.out.println("有返回值无参数,返回值是"+i);
+        return i;
+    }
+
+    //有返回值有参数
+    public int m4(int i){
+        int i1 = 10;
+        System.out.println("有返回值有参数,参数是:"+i+"返回值是"+i1);
+        return i1;
+    }
+
+
+    public static void main(String[] args) {
+        Mthod01 mthod01 = new Mthod01();
+
+        mthod01.m1();
+        mthod01.m2(101);
+        int i = mthod01.m3(); // 有返回值 1 再次赋值  2 条件运算  3 当做参数   接收返回值
+        System.out.println(i);
+        int i1 = mthod01.m4(102);
+        System.out.println(i1);
+    }
+}

+ 15 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/Emp.java

@@ -0,0 +1,15 @@
+package com.lovecding.day07.oop06;
+
+public class Emp {
+
+    MyDate myDate;
+
+    public void setYear( int year  ){
+        myDate.year = year;
+    }
+
+    public void setMyDate( MyDate myDate ){
+        myDate = myDate;
+    }
+
+}

+ 34 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams.java

@@ -0,0 +1,34 @@
+package com.lovecding.day07.oop06;
+
+public class MethodParams {
+
+    //基本数据类型
+    public void  m1(int i){
+        System.out.println(i);
+    }
+
+    //引用数据类型
+    public void  m2( Person person ){
+        person.eat();
+    }
+
+    //数组
+    public void  m3( int[] arr ){
+        //遍历
+        for (int i : arr) {
+            System.out.print(i+",");
+        }
+    }
+
+    public static void main(String[] args) {
+        MethodParams m1 = new MethodParams();
+        m1.m1(10);
+
+        Person person = new Person();
+        m1.m2(person);
+
+        int[] arr = {1,2,3};
+        m1.m3(arr);
+
+    }
+}

+ 30 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams2.java

@@ -0,0 +1,30 @@
+package com.lovecding.day07.oop06;
+
+import java.util.Arrays;
+
+public class MethodParams2 {
+
+    public void m1( int i){
+        System.out.println(i+10);
+    }
+
+
+    //数组中数字+10;
+    public void m2( int[] arr){
+        for (int i = 0; i < arr.length; i++) {
+            arr[i] = arr[i]+10;
+        }
+    }
+
+    public static void main(String[] args) {
+        MethodParams2 m = new MethodParams2();
+
+        m.m1(10);
+
+        int[] arr = {1,2,3};
+        //调用方法
+        m.m2(arr);
+
+        System.out.println(Arrays.toString(arr));
+    }
+}

+ 33 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams3.java

@@ -0,0 +1,33 @@
+package com.lovecding.day07.oop06;
+
+public class MethodParams3 {
+
+    public int m1(){
+        return 10;
+    }
+
+    public int m2( int m){
+        return m;
+    }
+
+    public static void main(String[] args) {
+        MethodParams3 m = new MethodParams3();
+        //赋值
+       int i = m.m1(); //10
+        System.out.println("i="+i);
+
+        //操作
+        if (m.m1() == 10){
+            System.out.println("等于10");
+        }
+
+        System.out.println(m.m1() + 10);
+
+        //当做参数
+        int i1 = m.m2(m.m1());
+        System.out.println(i1); //10
+
+        //很少 单独调用
+        m.m1();
+    }
+}

+ 26 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/MethodParams4.java

@@ -0,0 +1,26 @@
+package com.lovecding.day07.oop06;
+
+public class MethodParams4 {
+
+    //返回引用
+    public Person getPerson(){
+        //创建
+        Person person = new Person();
+        return person;
+    }
+
+    //返回数组
+    public int[] getArr(){
+        //创建
+        int[] arr = {1,2,3};
+        return arr;
+    }
+
+    public static void main(String[] args) {
+        MethodParams4 m = new MethodParams4();
+        Person person = m.getPerson();
+        System.out.println(person);
+
+        System.out.println(m.getArr());
+    }
+}

+ 5 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/MyDate.java

@@ -0,0 +1,5 @@
+package com.lovecding.day07.oop06;
+
+public class MyDate {
+    int year;
+}

+ 7 - 0
JavaSE/day07/src/com/lovecding/day07/oop06/Person.java

@@ -0,0 +1,7 @@
+package com.lovecding.day07.oop06;
+
+public class Person {
+    public void eat(){
+        System.out.println("吃饭");
+    }
+}

BIN
JavaSE/out/production/day01/AAAA.class


BIN
JavaSE/out/production/day01/HelloWorld.class


BIN
JavaSE/out/production/day01/Student.class


BIN
JavaSE/out/production/day01/com/lovcoding/day01/HelloWorld.class


BIN
JavaSE/out/production/day02/com/lovcoding/day01/Test01_ChangLiang.class


BIN
JavaSE/out/production/day02/com/lovcoding/day01/Test02_BianLiang.class


BIN
JavaSE/out/production/day02/com/lovcoding/day01/Test03_YinShi.class


BIN
JavaSE/out/production/day02/com/lovcoding/day01/Test04_XianShi.class


BIN
JavaSE/out/production/day02/com/lovcoding/day01/Test05.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test01_SuanShu.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test02_SuanShu01.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test03_SuanShu_GuanXi.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test03_SuanShu_ex.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test04_SuanShu_LuoJi.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test05_SuanShu_ex02.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test06_SuanShu_SanYuan.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test07_SuanShu_SanYuan_ex.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test08_SuanShu_WeiYunSuan.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test09_SuanShu_WeiFuZhi.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test10_IF01.class


BIN
JavaSE/out/production/day03/com/lovecoding/day03/Test10_IF01_EX.class


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