xerga 1 an în urmă
părinte
comite
33266df5f3
83 a modificat fișierele cu 1885 adăugiri și 12 ștergeri
  1. 13 0
      JavaSe01/.idea/compiler.xml
  2. 2 0
      JavaSe01/.idea/encodings.xml
  3. 20 0
      JavaSe01/.idea/jarRepositories.xml
  4. 13 5
      JavaSe01/.idea/misc.xml
  5. 124 0
      JavaSe01/.idea/uiDesigner.xml
  6. 6 0
      JavaSe01/.idea/vcs.xml
  7. 0 2
      JavaSe01/day01/src/Test02.java
  8. 32 0
      JavaSe01/day02/src/Exer01.java
  9. 33 0
      JavaSe01/day02/src/Exer02.java
  10. 29 0
      JavaSe01/day02/src/Exer03.java
  11. 53 0
      JavaSe01/day02/src/Exer04.java
  12. 45 0
      JavaSe01/day02/src/Exer05.java
  13. 0 5
      JavaSe01/day02/src/Main.java
  14. 51 0
      JavaSe01/day02/src/Operator01.java
  15. 45 0
      JavaSe01/day02/src/Operator02.java
  16. 70 0
      JavaSe01/day02/src/Operator03.java
  17. 27 0
      JavaSe01/day02/src/Operator04.java
  18. 30 0
      JavaSe01/day02/src/Operator05.java
  19. 76 0
      JavaSe01/day02/src/Operator06.java
  20. 38 0
      JavaSe01/day02/src/Operator07.java
  21. 60 0
      JavaSe01/day02/src/Operator08.java
  22. 41 0
      JavaSe01/day02/src/Operator09.java
  23. 24 0
      JavaSe01/day02/src/Operator10.java
  24. 65 0
      JavaSe01/day02/src/Operator11.java
  25. 62 0
      JavaSe01/day02/src/Operator12.java
  26. 108 0
      JavaSe01/day02/src/Operator13.java
  27. 12 0
      JavaSe01/day03/pom.xml
  28. 40 0
      JavaSe01/day03/src/main/java/Exer01.java
  29. 36 0
      JavaSe01/day03/src/main/java/Exer02.java
  30. 82 0
      JavaSe01/day03/src/main/java/Exer03.java
  31. 40 0
      JavaSe01/day03/src/main/java/Exer04.java
  32. 41 0
      JavaSe01/day03/src/main/java/Exer05.java
  33. 40 0
      JavaSe01/day03/src/main/java/Exer06.java
  34. 44 0
      JavaSe01/day03/src/main/java/Exer07.java
  35. 25 0
      JavaSe01/day03/src/main/java/Test08.java
  36. 97 0
      JavaSe01/day03/src/main/java/Test09.java
  37. 48 0
      JavaSe01/day03/src/main/java/TestBC07.java
  38. 31 0
      JavaSe01/day03/src/main/java/TestDoWhile05.java
  39. 48 0
      JavaSe01/day03/src/main/java/TestFor03.java
  40. 53 0
      JavaSe01/day03/src/main/java/TestForFor06.java
  41. 30 0
      JavaSe01/day03/src/main/java/TestMath.java
  42. 42 0
      JavaSe01/day03/src/main/java/TestScanner.java
  43. 43 0
      JavaSe01/day03/src/main/java/TestSwitch01.java
  44. 37 0
      JavaSe01/day03/src/main/java/TestSwitch02.java
  45. 29 0
      JavaSe01/day03/src/main/java/TestWhile04.java
  46. BIN
      JavaSe01/day03/target/classes/Exer01.class
  47. BIN
      JavaSe01/day03/target/classes/Exer02.class
  48. BIN
      JavaSe01/day03/target/classes/Exer03.class
  49. BIN
      JavaSe01/day03/target/classes/Exer04.class
  50. BIN
      JavaSe01/day03/target/classes/Exer05.class
  51. BIN
      JavaSe01/day03/target/classes/Exer06.class
  52. BIN
      JavaSe01/day03/target/classes/Exer07.class
  53. BIN
      JavaSe01/day03/target/classes/Test08.class
  54. BIN
      JavaSe01/day03/target/classes/Test09.class
  55. BIN
      JavaSe01/day03/target/classes/TestBC07.class
  56. BIN
      JavaSe01/day03/target/classes/TestDoWhile05.class
  57. BIN
      JavaSe01/day03/target/classes/TestFor03.class
  58. BIN
      JavaSe01/day03/target/classes/TestForFor06.class
  59. BIN
      JavaSe01/day03/target/classes/TestMath.class
  60. BIN
      JavaSe01/day03/target/classes/TestScanner.class
  61. BIN
      JavaSe01/day03/target/classes/TestSwitch01.class
  62. BIN
      JavaSe01/day03/target/classes/TestSwitch02.class
  63. BIN
      JavaSe01/day03/target/classes/TestWhile04.class
  64. BIN
      JavaSe01/out/production/day01/Test02.class
  65. BIN
      JavaSe01/out/production/day02/Exer01.class
  66. BIN
      JavaSe01/out/production/day02/Exer02.class
  67. BIN
      JavaSe01/out/production/day02/Exer03.class
  68. BIN
      JavaSe01/out/production/day02/Exer04.class
  69. BIN
      JavaSe01/out/production/day02/Exer05.class
  70. BIN
      JavaSe01/out/production/day02/Main.class
  71. BIN
      JavaSe01/out/production/day02/Operator01.class
  72. BIN
      JavaSe01/out/production/day02/Operator02.class
  73. BIN
      JavaSe01/out/production/day02/Operator03.class
  74. BIN
      JavaSe01/out/production/day02/Operator04.class
  75. BIN
      JavaSe01/out/production/day02/Operator05.class
  76. BIN
      JavaSe01/out/production/day02/Operator06.class
  77. BIN
      JavaSe01/out/production/day02/Operator07.class
  78. BIN
      JavaSe01/out/production/day02/Operator08.class
  79. BIN
      JavaSe01/out/production/day02/Operator09.class
  80. BIN
      JavaSe01/out/production/day02/Operator10.class
  81. BIN
      JavaSe01/out/production/day02/Operator11.class
  82. BIN
      JavaSe01/out/production/day02/Operator12.class
  83. BIN
      JavaSe01/out/production/day02/Operator13.class

+ 13 - 0
JavaSe01/.idea/compiler.xml

@@ -0,0 +1,13 @@
+<?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="day03" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>

+ 2 - 0
JavaSe01/.idea/encodings.xml

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

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

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

+ 13 - 5
JavaSe01/.idea/misc.xml

@@ -1,6 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectRootManager">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
+<?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$/day03/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
 </project>

+ 124 - 0
JavaSe01/.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.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>

+ 6 - 0
JavaSe01/.idea/vcs.xml

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

+ 0 - 2
JavaSe01/day01/src/Test02.java

@@ -38,10 +38,8 @@ public class Test02 {
         }
         //System.out.println(a);
 
-
         int a , b , c ; //不推荐
 
-
         int d  = 30;
         //byte i = 128;
 

+ 32 - 0
JavaSe01/day02/src/Exer01.java

@@ -0,0 +1,32 @@
+/**
+ * ClassName: Exer01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:52
+ * @Version 1.0
+ */
+public class Exer01 {
+    /*
+    随意给出一个整数,打印显示它的个位数,十位数,百位数的值。
+    举例如下:
+    数字153的情况如下:
+    个位数:3
+    十位数:5
+    百位数:1
+     */
+    public static void main(String[] args) {
+        int numebr = 153;
+
+        int g = numebr % 10;
+        System.out.println(g);
+
+        int s = numebr / 10 % 10;
+        System.out.println(s);
+
+        int b = numebr / 100;
+        System.out.println(b);
+
+    }
+}

+ 33 - 0
JavaSe01/day02/src/Exer02.java

@@ -0,0 +1,33 @@
+/**
+ * ClassName: Exer01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:52
+ * @Version 1.0
+ */
+public class Exer02 {
+
+    public static void main(String[] args) {
+        //马晕
+        int my = 500000000;
+
+        //普通人 月
+        int ordinary_m = 4200;
+
+        //普通人 天
+        int ordinary_d = 120;
+
+        int month =  my / ordinary_m;
+        System.out.println("需要"+month+"个月!");
+
+        //剩余金额 自动提升
+        int remainder = my % ordinary_m;
+
+        //天数
+        int days = remainder / ordinary_d;
+
+        System.out.println("需要"+days+"天");
+    }
+}

+ 29 - 0
JavaSe01/day02/src/Exer03.java

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

+ 53 - 0
JavaSe01/day02/src/Exer04.java

@@ -0,0 +1,53 @@
+/**
+ * ClassName: Exer01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:52
+ * @Version 1.0
+ */
+public class Exer04 {
+
+    /*
+    获取三个数中的最大值
+
+    - 分析
+      - a b c 三个数字
+      - a  b   用 a 和 b 比较  m = 大
+      - m 和 c 比较
+     */
+    public static void main1(String[] args) {
+        int a = 10;
+        int b = 20;
+        int c = 30;
+        //a和b中 比较大的值
+        int n = a > b ? a : b;
+
+        //n 和 c 比较结果
+        int m = n > c ? n : c;
+
+        System.out.println(m);
+    }
+
+
+    /*
+    今天是周3,100天以后是周几?
+    - 7天 是周三
+    int week = 3;
+    int days = 100;
+    int d = days %= 7;
+    week = (d + week) % 7;
+    System.out.println("今天是周3,100天以后是周" + (week == 0 ? "日" : week));
+
+     */
+
+    public static void main(String[] args) {
+        int week = 3;
+        int days = 100;
+
+        int d = (days + week) % 7;
+        System.out.println(d);
+    }
+
+}

+ 45 - 0
JavaSe01/day02/src/Exer05.java

@@ -0,0 +1,45 @@
+/**
+ * ClassName: Exer01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:52
+ * @Version 1.0
+ */
+public class Exer05 {
+
+    /*
+    Exer04
+    3.定义三个整数变量. 按顺序输出 变量的大小.从小到大.
+     */
+    public static void main(String[] args) {
+        int a = 40;
+        int b = 20;
+        int c = 30;
+
+        if ( a > b ){
+            if ( b > c ){
+                System.out.println(a +" > " + b + " > "+ c);
+            }else{ // c > b
+                if(a > c){
+                    System.out.println(a +" > " + c + " > "+ b);
+                }else {
+                    System.out.println(c +" > " + a + " > "+ b);
+                }
+            }
+        }else{ // b > a
+            if ( a > c ){
+                System.out.println(b +" > " + a + " > "+ c);
+            }else{ //c > a
+                if (b > c){
+                    System.out.println(b +" > " + c + " > "+ a);
+                }else{
+                    System.out.println(c +" > " + b + " > "+ a);
+                }
+            }
+        }
+    }
+
+
+}

+ 0 - 5
JavaSe01/day02/src/Main.java

@@ -1,5 +0,0 @@
-public class Main {
-    public static void main(String[] args) {
-        System.out.println("Hello world!");
-    }
-}

+ 51 - 0
JavaSe01/day02/src/Operator01.java

@@ -0,0 +1,51 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator01 {
+
+    /*
+    数据类型 特点
+        byte  short  不能超范围
+        int 常量数字 默认是 int
+        long 使用 加 L
+
+        float 加 F
+        double 默认类型 加D 也可以不加
+
+     */
+    public static void main(String[] args) {
+        byte b = 127;
+        //byte a = 128; //超出范围
+
+        byte d = 10;
+
+        //byte c = 40+20;//常量优化
+        //byte c = d+20; // 20 是常量  默认是 int 类型
+
+        long f = 12345678910L; // long  L建议大写
+
+        //浮点
+        float f1 = 10.222222222222F;  // 精度 到后 6位
+
+        System.out.println(f1);
+
+        double d1 = 10.2222222222222223333333;
+
+        System.out.println(d1);
+
+        //char
+        char c1 = 'a';  //单引号  只有一个字符
+
+        //布尔
+        boolean b1 = true;
+        boolean b2 = false;
+
+    }
+
+}

+ 45 - 0
JavaSe01/day02/src/Operator02.java

@@ -0,0 +1,45 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator02 {
+
+    /*
+    算数运算符
+        +、-、*、/、%
+     */
+    public static void main(String[] args) {
+        // +
+        System.out.println(10+20);
+
+        int a = 10;
+        int b = 20;
+        System.out.println(a+b);
+
+        // *
+        double d1 = 0.1; // 0.1  指数位 小数位
+        double d2 = 0.2;
+        // 不会等于  0.2的  JSR 304标准
+        System.out.println(d1*d2);
+
+
+        int i1 = 10;
+        int i2 = 3;
+        System.out.println(i1*i2);
+        // / 10 / 3 = 整除整取  3
+        System.out.println(i1/i2);
+
+        // %
+        int a1 = 10;
+        int a2 = 3;
+
+        System.out.println(a1%a2);
+
+    }
+
+}

+ 70 - 0
JavaSe01/day02/src/Operator03.java

@@ -0,0 +1,70 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator03 {
+
+    /*
+     + 特殊用法
+       用法1:加法操作
+     */
+    public static void main(String[] args) {
+        byte b =20;
+
+        // byte c = b + 20;//编译  数据类型 提升
+
+        int c = b + 20;  //数据类型
+
+        char c1 = 'a';
+
+        System.out.println(c1 + 1);
+
+
+        //用法2: 连接
+        // 和字符串 相加 数字变为字符串 = 连接
+        // +数字 加法运算 从前往后
+        int i1 = 4;
+
+        System.out.println("1"+"2"+"3"+i1+"5"); // 12345
+        System.out.println(1+2+3+"4"+i1); //
+
+        System.out.println("----------");
+
+        //用法3 ++ --
+        int d1 = 10;
+        int d2 = 0;
+
+        //情况1 单独
+        //d1++;
+
+        //++d1;
+        System.out.println(d1);
+
+        //情况2 参与运算
+
+        //d2 = d1++; // 选取值  d2=10    d1++ = 11
+        d2 = ++d1;   // 选+1    d2=11    ++d1 = 11
+
+        System.out.println(d1);
+        System.out.println(d2);
+
+        int a1 = 10;
+        //        10   +  12  + 10                 a1 = 12
+        int a2  = a1++ + ++a1 + 10;
+        System.out.println(a2); // 32
+        System.out.println(a1); // 12
+
+
+        int i = 1;
+        int k = i++ + ++i * i++;
+        //++优先级高于 + 法
+        System.out.println("k = " + k); //?
+        System.out.println("i = " + i); //?
+    }
+
+}

+ 27 - 0
JavaSe01/day02/src/Operator04.java

@@ -0,0 +1,27 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator04 {
+
+    /*
+     + 特殊用法
+       用法1:加法操作
+     */
+    public static void main(String[] args) {
+        int i = 2;
+        int j = i++;
+        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);
+    }
+
+}

+ 30 - 0
JavaSe01/day02/src/Operator05.java

@@ -0,0 +1,30 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator05 {
+
+    /*
+        赋值运算符
+     */
+    public static void main(String[] args) {
+        int a = 10;
+
+        a += 20; // a = a + 20;
+        System.out.println("+=结果:"+a);
+        a -= 10; // a = a - 10
+        System.out.println("-=结果:"+a);
+        a *= 10; // a = a * 10
+        System.out.println("*=结果:"+a);
+        a /= 10;
+        System.out.println("/=结果:"+a);
+        a %= 7;
+        System.out.println("%=结果:"+a);
+    }
+
+}

+ 76 - 0
JavaSe01/day02/src/Operator06.java

@@ -0,0 +1,76 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator06 {
+
+    /*
+        运算符转换
+     */
+    public static void main(String[] args) {
+        byte a = 10;     //byte  1
+        int b = 20;      //int     4
+
+        //a = b;  // 大  到   小  不可以  强制转换
+        b = a;    // 小  到   大   可以   自动转换
+
+
+        //自动转换
+        byte a1 = 20;
+        int a2 = a1;
+        long a3 = a1;
+        float a4 = a1;
+
+        //运算赋值
+        //10 默认 int
+        // + 提升类型
+        //byte a5 = a1 + 10; // 强制转换 提升类型
+        int a5 = a1 + 10; // 强制转换 提升类型
+
+        //+= 原理  强制转换
+        a5 += 10;
+
+
+        byte b3 = 10;
+        short b4 = 20;
+
+        int i = b3 + b4;
+
+        short b5 = b3;
+
+
+        //强制转换
+        int  i1 = 257;
+
+        //强制转换
+        byte i2 = (byte) i1;
+        System.out.println(i2);
+
+
+        //面试题
+
+        //byte short
+
+        short s2 = 10;
+
+        //s2 = s2 + 10; //编译不通过  int + short   提升类型 强制
+
+        s2 += 10; // 强制 s2 = (short) (s2+ 10) 提升 int 强制转换为short
+
+
+        int a11 = 128;  //强制转换 byte 结果是什么?
+
+        // 0000 0000 1000 0000
+        // 1000 0000  表示 -128 特殊值
+
+        byte a12 =  (byte) a11;
+        System.out.println(a12);
+
+    }
+
+}

+ 38 - 0
JavaSe01/day02/src/Operator07.java

@@ -0,0 +1,38 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator07 {
+
+    /*
+        比较
+     */
+    public static void main(String[] args) {
+
+        int i1 = 10;
+        int i2 = 20;
+
+        System.out.println(i1 == i2);//false
+        System.out.println(i1 != i2);//true
+        System.out.println(i1 >= i2);//false
+
+
+        int m = 10;
+        int n = 20;
+        System.out.println(m == n);//false
+        System.out.println(m = n);//20
+
+        boolean b1 = false;
+        boolean b2 = true;
+        System.out.println(b1 == b2);//false
+        System.out.println(b1 = b2);//true
+
+
+    }
+
+}

+ 60 - 0
JavaSe01/day02/src/Operator08.java

@@ -0,0 +1,60 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator08 {
+
+    /*
+        逻辑
+     */
+    public static void main(String[] args) {
+
+        int a = 3;
+        int b = 4;
+        int c = 5;
+
+        // & 与,且;有false则false
+        System.out.println((a > b) & (a > c));
+        System.out.println((a > b) & (a < c));
+        System.out.println((a < b) & (a > c));
+        System.out.println((a < b) & (a < c)); //T
+        System.out.println("===============");
+        // | 或;有true则true
+        System.out.println((a > b) | (a > c));
+        System.out.println((a > b) | (a < c));
+        System.out.println((a < b) | (a > c));
+        System.out.println((a < b) | (a < c));
+        System.out.println("===============");
+        // ^ 异或;相同为false,不同为true
+        System.out.println((a > b) ^ (a > c));  // F F
+        System.out.println((a > b) ^ (a < c));  // F T T
+        System.out.println((a < b) ^ (a > c));  // T F T
+        System.out.println((a < b) ^ (a < c));
+        System.out.println("===============");
+        // ! 非;非false则true,非true则false
+        System.out.println(!false);
+        System.out.println(!true);
+
+        System.out.println("================");
+        //&和&&的区别
+        //a = 3 b = 4 c = 5
+//        System.out.println((a > b) & (a++ > c));
+//        System.out.println("a = " + a);
+//        System.out.println((a > b) && (a++ > c));
+//        System.out.println("a = " + a);
+
+
+        //|和||的区别
+//        System.out.println((a > b) | (a++ > c));
+//        System.out.println("a = " + a);
+        System.out.println((b > a) || (a++ > c));
+        System.out.println("a = " + a);
+
+    }
+
+}

+ 41 - 0
JavaSe01/day02/src/Operator09.java

@@ -0,0 +1,41 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator09 {
+
+    /*
+        三元
+     */
+    public static void main(String[] args) {
+        // 获取 两个数中 比较大的值
+        int a = 3;
+        int b = 4;
+
+        // (条件表达式) ? 
+        int i = a > b ? a : b;
+
+        System.out.println(i);
+
+
+        //变量
+        boolean flag = true;
+
+        String s = flag == true ? "hello" : "hi";
+        System.out.println(s);
+
+        //值使用
+        double a1 = ( 3 > 4 ) ? 1.0 : 1;
+
+        //数据值类型 兼容
+
+
+
+    }
+
+}

+ 24 - 0
JavaSe01/day02/src/Operator10.java

@@ -0,0 +1,24 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator10 {
+
+    /*
+        三元
+     */
+    public static void main(String[] args) {
+
+        System.out.println(2^3);
+        System.out.println(~3);
+        System.out.println(!true);
+
+
+    }
+
+}

+ 65 - 0
JavaSe01/day02/src/Operator11.java

@@ -0,0 +1,65 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator11 {
+
+    /*
+        案例 if
+     */
+    public static void main1(String[] args) {
+        int date = 20230824;
+
+        if ( date == 20230824  ) { // 返回 boolean
+            System.out.println("投放核弹");
+        }
+
+        System.out.println("执行");
+    }
+
+    /*
+     * if else 案例
+     * 需求:定义定义变量 war 如果是true 用核弹消灭小日本,否则被海水淹没.
+     */
+    public static void main2(String[] args) {
+        boolean war = false;
+
+        //注意 对于 boolean 可以 不用判断
+        if (war){
+            System.out.println("核弹消灭小日本");
+        }else{
+            System.out.println("被海水淹没");
+        }
+    }
+
+    /*
+    小明公司出品干死小日本游戏,在游戏中对于杀死小日本人数,给出响应奖励.
+
+        - 杀死  10人以内, 奖励人民币100元.
+        - 杀死  10 - 100 人以内, 奖励华为手机一部.
+        - 杀死  100 - 1000 人以内, 奖励奇瑞汽车一台.
+        - 杀死  1000 - 10000 人以内, 奖励苍老师服务一次.
+        - 其他人数 没有奖励
+     */
+
+    public static void main(String[] args) {
+        int persons = 111;
+
+        if (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("没有奖励");
+        }
+    }
+}

+ 62 - 0
JavaSe01/day02/src/Operator12.java

@@ -0,0 +1,62 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator12 {
+
+    /*
+         if 问题
+         省略 {} 第一行 当作默认的执行体
+         () 后面有分号 ; 结束 判断
+
+
+         嵌套问题
+
+     */
+
+    public static void main(String[] args) {
+        //分数 0-100
+        int s = -1;
+
+        //健壮性
+        if (s >= 0 && s <= 100){
+            if ( s  >= 60 && s < 70  ){
+                System.out.println("及格");
+            }else if ( s > 80 && s <= 90 ){
+                System.out.println("良好");
+            }
+        }else {
+            System.out.println("分数不正确");
+        }
+
+        /*
+          if(){
+            if(){
+                嵌套
+            }
+          }
+         */
+        //两个数字 大
+        int i1 = 100;
+        int i2 = 100;
+
+        int m = 0;
+
+        if (i1 > i2){
+            m = i1;
+        }else{
+            m = i2;
+        }
+
+        //输出 true 核弹消灭
+
+
+    }
+
+
+}

+ 108 - 0
JavaSe01/day02/src/Operator13.java

@@ -0,0 +1,108 @@
+/**
+ * ClassName: Operator01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/10 9:24
+ * @Version 1.0
+ */
+public class Operator13 {
+
+    //位运算符
+    //&、\|、^、~、<<、>>、>>>
+    public static void main(String[] args) {
+        System.out.println(6&2);
+        /*
+            0000 0110
+            0000 0010  并且
+        ------------------
+            0000 0010
+         */
+
+        System.out.println(4|2);
+
+        /*
+            0000 0100
+            0000 0010   或者
+        ------------------
+            0000 0110
+         */
+
+        System.out.println(4^2);
+        /*
+            0000 0100
+            0000 0010   亦或 1 0 取 1
+        ------------------
+            0000 0110
+         */
+
+
+        System.out.println(~2);
+        /*
+            0000 0010   取反
+        ------------------
+            1111 1101   补码
+            1111 1100   -1
+
+            1000 0011   源码
+
+            1000 0011   源码
+
+         */
+        /*
+           7 正整数
+           0000 0111   源码
+           0000 0111   反码
+           0000 0111   补码   底层  补码
+
+           -7 负整数
+
+           1000 0111   源码
+           1111 1000   反码 符号位不参与运算
+
+           1111 1001   补码
+         */
+
+
+        System.out.println(4<<2);
+        /*
+            0000 0100
+
+            0001 0000
+         */
+
+        System.out.println(4>>1);
+
+        /*
+            0000 0100
+
+            0000 0010
+         */
+        System.out.println(-4>>1);
+
+        System.out.println(8>>>1);
+        /*
+            0000 1000
+
+            0000 0100
+         */
+        System.out.println(-8>>>1);
+
+        /*
+            1000 0000 00000 0000 0000 000 1000
+
+            0 100000
+         */
+
+        System.out.println('a'+0);
+        System.out.println('z'+0);
+        System.out.println('A'+0);
+        System.out.println('Z'+0);
+
+        System.out.println('0');
+        System.out.println('9');
+    }
+
+
+}

+ 12 - 0
JavaSe01/day03/pom.xml

@@ -0,0 +1,12 @@
+<?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.lc</groupId>
+    <artifactId>day03</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+
+</project>

+ 40 - 0
JavaSe01/day03/src/main/java/Exer01.java

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

+ 36 - 0
JavaSe01/day03/src/main/java/Exer02.java

@@ -0,0 +1,36 @@
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer02 {
+
+    /*
+    实现:输入学生年龄,如果大于18岁的,输出“成年人”。低于18岁的,输出“青少年”。
+    不能 使用 所有值 都匹配
+    case 1
+    csee 2
+
+    先用 除法  在判断是否 大于1
+
+     */
+    public static void main(String[] args) {
+
+        int age = 22;
+
+        int i = age / 18;
+
+        switch (i){
+            case 0:
+                System.out.println("青少年");
+                break;
+            case 1:
+                System.out.println("成年人");
+                break;
+        }
+    }
+}

+ 82 - 0
JavaSe01/day03/src/main/java/Exer03.java

@@ -0,0 +1,82 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer03 {
+
+    /*
+    Exer02>
+    switch中case具有穿透性,不遇到break不会停止.会向下执行.
+
+    编写程序:
+    从键盘上输入2023年的“month”和“day”,
+    要求通过程序输出输入的日期为2023年的第几天。
+        day = 10
+        ==1 day
+        ==2 + 31 + day
+        ==3 + 31 + 28 + day
+        ....
+        ==12 + 31 + 28 + 31 + 30 + 31 ..... + day
+
+         case 穿透性
+        days = 0;
+
+        case 12:
+            days+=31;
+        case 11:
+            days+=30;
+
+            ....
+        case 1:
+            days+= day;
+     */
+    public static void main(String[] args) {
+        //键盘输入
+        Scanner scanner = new Scanner(System.in);
+        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:
+                days += 28;
+            case 2:
+                days += 31;
+            case 1:
+                days += day;
+        }
+
+        System.out.println("2023年"+month+"月"+day+"天:是2023年的第"+days+"天");
+    }
+}

+ 40 - 0
JavaSe01/day03/src/main/java/Exer04.java

@@ -0,0 +1,40 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer04 {
+
+    /*
+        键盘输入一个数字.判断其是否是 素数( 素数只能被1-本身整除的数字 )
+     */
+    public static void main(String[] args) {
+
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入正整数");
+        int num = scanner.nextInt();
+
+        // 2 - 数字 - 1
+        // 标识
+        boolean flag = true;
+
+        for (int i = 2; i < num; i++) {
+            if ( num % i == 0 ){
+                flag = false;
+            }
+        }
+
+        //判断 标识
+        if (flag){
+            System.out.println(num+"是素数");
+        }else{
+            System.out.println(num+"不是是素数");
+        }
+    }
+}

+ 41 - 0
JavaSe01/day03/src/main/java/Exer05.java

@@ -0,0 +1,41 @@
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer05 {
+
+    /*
+    案例1: 水井深12米,青蛙第一天跳1米,之后每天比前一天多跳0.2米.请问几天能跳出井.
+
+    和 0;
+    初始化  double  i = 0;
+    条件    12 > i 循环
+    循环体  i+1
+    迭代    i += 0.2
+     */
+    public static void main(String[] args) {
+        //初始化
+        double i = 1;
+        double sum = 0;
+        //记录天数
+        int count = 0;
+
+        //判断
+        while (sum < 12){
+            //执行体
+            count++;
+
+            //迭代
+            sum += i;
+
+            i+= 0.2;
+        }
+
+        System.out.println("需要:"+count+"天");
+    }
+}

+ 40 - 0
JavaSe01/day03/src/main/java/Exer06.java

@@ -0,0 +1,40 @@
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer06 {
+
+    /*
+    案例1: 水井深12米,青蛙第一天跳1米,之后每天比前一天多跳0.2米.请问几天能跳出井.
+
+    和 0;
+    初始化  double  i = 0;
+    条件    12 > i 循环
+    循环体  i+1
+    迭代    i += 0.2
+     */
+    public static void main(String[] args) {
+        //well
+        double well = 12;
+        //jump
+        double jump = 1;
+
+        //标识
+        int count = 0;
+
+        while (well > 0){
+            well -= jump; //减去前一天的高度
+
+            jump+=0.2; //每天多0.2
+
+            count++;
+        }
+
+        System.out.println("跳了:"+count+"天");
+    }
+}

+ 44 - 0
JavaSe01/day03/src/main/java/Exer07.java

@@ -0,0 +1,44 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: Exer02
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:33
+ * @Version 1.0
+ */
+public class Exer07 {
+
+    /*
+    随机生成一个100以内的数,猜这个随机数是多少?
+    从键盘输入数,如果大了,提示大了;如果小了,提示小了;如果对了,就不再猜了,并统计一共猜了多少次。
+    提示:生成一个[a,b] 范围的随机数的方式:(int)(Math.random() * (b - a + 1) + a)
+
+    初始值    输入数字
+    循环条件  输入数字 != 随机数
+    循环体    判断  大  小
+    迭代      改变输入数字
+
+     */
+    public static void main(String[] args) {
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入猜测数字");
+        int num = scanner.nextInt();
+        //随机数
+        int number = (int) (Math.random() * 100);
+
+        while ( num != number ){
+            if (num > number ){
+                System.out.println("输入的数字大了");
+            }
+            if (num < number ){
+                System.out.println("输入的数字小了");
+            }
+            System.out.println("请输入猜测数字");
+            num = scanner.nextInt();
+        }
+        System.out.println("猜对了:"+num);
+    }
+}

+ 25 - 0
JavaSe01/day03/src/main/java/Test08.java

@@ -0,0 +1,25 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class Test08 {
+
+    /*
+    break和continue
+     */
+    public static void main(String[] args) {
+//       while (true){
+//           System.out.println("hello");
+//       }
+
+        for (; true;) {
+            System.out.println("hello");
+        }
+
+    }
+}

+ 97 - 0
JavaSe01/day03/src/main/java/Test09.java

@@ -0,0 +1,97 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class Test09 {
+
+    /*
+    找出100以内所有的素数(质数)?100000以内的呢?**
+    目的:不同的代码的实现方式,可以效率差别很大。
+    分析:素数(质数):只能被1和它本身整除的自然数。  ---> 从2开始,到这个数-1为止,此范围内没有这个数的约数。则此数是一个质数。
+    比如:2、3、5、7、11、13、17、19、23、...
+
+    for( 1- 100 ){   i
+        i = 1 2 3 ... 100;  3-100
+        // 3  17  77
+        // 标识
+        for(2 -  < i){   j
+            if( i % j == 0 ){
+                //改变标识
+            }
+        }
+        判断
+    }
+
+
+     */
+    public static void main1(String[] args) {
+        //1-100
+        long start = System.currentTimeMillis();
+        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); //8141
+    }
+
+    public static void main2(String[] args) {
+        //1-100
+        long start = System.currentTimeMillis();
+        for (int i = 3; i <=100000 ; i++) {
+            //标识
+            boolean flag = true;
+
+            for (int j = 2; j < i; j++) {
+                if (i % j == 0){
+                    flag = false;
+                    //结束 有一个可以被整除数字
+                    break;
+                }
+            }
+            if (flag){
+                //System.out.println(i);
+            }
+        }
+        long end = System.currentTimeMillis();
+
+        System.out.println(end-start); // 813
+    }
+    public static void main(String[] args) {
+        //1-100
+        long start = System.currentTimeMillis();
+        for (int i = 3; i <=1000000 ; i++) {
+            //标识
+            boolean flag = true;
+
+            for (int j = 2; j < Math.sqrt(i); j++) { // 36  Math.sqrt(i)
+                if (i % j == 0){
+                    flag = false;
+                    //结束 有一个可以被整除数字
+                    break;
+                }
+            }
+            if (flag){
+                //System.out.println(i);
+            }
+        }
+        long end = System.currentTimeMillis();
+
+        System.out.println(end-start); // 9  //百万  127
+    }
+}

+ 48 - 0
JavaSe01/day03/src/main/java/TestBC07.java

@@ -0,0 +1,48 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestBC07 {
+
+    /*
+    break和continue
+     */
+    public static void main(String[] args) {
+        for (int i = 0; i < 5; i++) {
+            if (i == 3){
+                continue;
+            }
+            System.out.println(i);
+        }
+        System.out.println("------------------");
+        //猜数字案例 修改
+        Scanner scanner = new Scanner(System.in);
+
+        //随机数
+        int number = (int) (Math.random() * 100);
+        int num = 0;
+        while ( true ){
+            System.out.println("请输入猜测数字");
+            num = scanner.nextInt();
+            if (num > number ){
+                System.out.println("输入的数字大了");
+            }
+            if (num < number ){
+                System.out.println("输入的数字小了");
+            }
+            //break
+            if (num == number){
+                break;
+            }
+        }
+        System.out.println("猜对了:"+num);
+
+    }
+}

+ 31 - 0
JavaSe01/day03/src/main/java/TestDoWhile05.java

@@ -0,0 +1,31 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestDoWhile05 {
+
+
+    public static void main(String[] args) {
+        //循环10次helloworld
+        int i = 0;
+        do {
+            System.out.println("行号"+(i+1)+"hello world");
+            i++;
+        }while (i<10);
+
+
+        //体会doewhile
+
+        System.out.println("-------------");
+        int j = 0;
+        do {
+            System.out.println("行号"+(j +1)+"hello world");
+            j ++;
+        }while (false);
+    }
+}

+ 48 - 0
JavaSe01/day03/src/main/java/TestFor03.java

@@ -0,0 +1,48 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestFor03 {
+
+    //TestSwitch02
+    // 输出10行HelloWorld.
+    public static void main(String[] args) {
+        //循环
+        for ( int i = 0; i < 10 ; i++ ){
+            System.out.println("HelloWorld");
+        }
+
+        // 行号
+        for ( int i = 0; i < 10 ; i++ ){
+            System.out.println("第"+(i+1) +"行 HelloWorld");
+        }
+
+        //1-100
+        //
+        for (int i = 1 ; i <= 100 ; i++) {
+            //判断
+            if ( i % 2 != 0 ){
+                System.out.println(i);
+            }
+        }
+
+        //算出1-100的偶数数字的总和.
+
+        //标识
+        int sum = 0;
+
+        for (int i = 1 ; i <= 100 ; i++) {
+            //判断
+            if ( i % 2 == 0 ){
+                sum += i;
+            }
+        }
+
+        System.out.println("偶数总和:"+sum);
+    }
+}

+ 53 - 0
JavaSe01/day03/src/main/java/TestForFor06.java

@@ -0,0 +1,53 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestForFor06 {
+
+    /*
+    for循环嵌套
+     */
+    public static void main(String[] args) {
+        //外 循环 控制 行
+        for (int i = 0; i < 5; i++) {
+            //内层 控制 列
+            for (int j = 0; j < 6; j++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+
+        System.out.println("-------------------");
+        //循环
+        //打印5行直角三角形
+        for (int i = 1; i <= 5; i++) {
+            //内层 控制 列
+            for (int j = 1; j <= i; j++) {
+                System.out.print(" * ");
+            }
+            System.out.println();
+        }
+
+
+        System.out.println("-----------------");
+        /*
+        9 * 9 乘法表
+         */
+
+        for (int i = 1; i <=9 ; i++) {
+            for (int j = 1; j <=i ; j++) {
+                System.out.print(i+" * "+j+" = "+(i*j)+" ");
+            }
+            System.out.println();
+        }
+
+
+
+
+    }
+}

+ 30 - 0
JavaSe01/day03/src/main/java/TestMath.java

@@ -0,0 +1,30 @@
+/**
+ * ClassName: TestScanner
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 9:20
+ * @Version 1.0
+ */
+public class TestMath {
+
+    public static void main(String[] args) {
+        //随机数
+        double random = Math.random();
+
+        System.out.println("随机数:"+random);
+
+        //0-10 ]
+        int v = (int) (random * 10);
+        System.out.println("0-10:"+v);
+
+        //5-10 ]
+        int v1 = (int) (random * 5); // 0-4
+        System.out.println("0-10:"+(v1+5));
+
+        // `[a,b]` int)(Math.random() * (b - a + 1)) + a`
+
+    }
+
+}

+ 42 - 0
JavaSe01/day03/src/main/java/TestScanner.java

@@ -0,0 +1,42 @@
+import java.util.Scanner;
+
+/**
+ * ClassName: TestScanner
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 9:20
+ * @Version 1.0
+ */
+public class TestScanner {
+
+    public static void main(String[] args) {
+        //数据类型 变量 = new 类名(参数);
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("请输入int数据");
+        //调用 输入之后结果赋值给 变量 i
+        int i = scanner.nextInt();
+
+        System.out.println("int:"+i);
+
+        System.out.println("请输入double数据");
+        //double
+        double d = scanner.nextDouble();
+
+        System.out.println("double:"+d);
+
+        System.out.println("请输入boolean数据");
+        //boolean
+        boolean b = scanner.nextBoolean();
+
+        System.out.println("boolean:"+b);
+
+        System.out.println("请输入String数据");
+        //String
+        String s = scanner.next();
+
+        System.out.println("String:"+s);
+    }
+
+}

+ 43 - 0
JavaSe01/day03/src/main/java/TestSwitch01.java

@@ -0,0 +1,43 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestSwitch01 {
+
+    public static void main(String[] args) {
+        //根据数字 匹配 星期
+        int m = 5;
+
+        switch (m){
+            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;
+        }
+    }
+}

+ 37 - 0
JavaSe01/day03/src/main/java/TestSwitch02.java

@@ -0,0 +1,37 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestSwitch02 {
+
+    public static void main(String[] args) {
+        //根据数字 匹配 星期
+        String m = "8";
+
+        switch (m){
+
+            case "1":
+                System.out.println("星期一");
+                break;
+            case "2":
+                System.out.println("星期二");
+            case "3":
+                System.out.println("星期三");
+            case "4":
+                System.out.println("星期四");
+                break;
+            default:
+                System.out.println("错误");
+        }
+
+        //case 穿透
+        // int byte char short enum (枚举) String
+        //
+
+    }
+}

+ 29 - 0
JavaSe01/day03/src/main/java/TestWhile04.java

@@ -0,0 +1,29 @@
+/**
+ * ClassName: TestSwitch01
+ * Package: PACKAGE_NAME
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/9/17 10:23
+ * @Version 1.0
+ */
+public class TestWhile04 {
+
+
+    public static void main(String[] args) {
+        //循环10次helloworld
+
+        int i = 0;
+        while ( i < 10 ){
+            System.out.println("行号"+ (i+1)+ " helloworld");
+            i++;
+        }
+
+        /*
+        初始化 int i = 0;
+        条件判断 ( i < 10 )
+        循环体 System.out.println("行号"+ (i+1)+ " helloworld");
+         迭代 i++;
+         */
+    }
+}

BIN
JavaSe01/day03/target/classes/Exer01.class


BIN
JavaSe01/day03/target/classes/Exer02.class


BIN
JavaSe01/day03/target/classes/Exer03.class


BIN
JavaSe01/day03/target/classes/Exer04.class


BIN
JavaSe01/day03/target/classes/Exer05.class


BIN
JavaSe01/day03/target/classes/Exer06.class


BIN
JavaSe01/day03/target/classes/Exer07.class


BIN
JavaSe01/day03/target/classes/Test08.class


BIN
JavaSe01/day03/target/classes/Test09.class


BIN
JavaSe01/day03/target/classes/TestBC07.class


BIN
JavaSe01/day03/target/classes/TestDoWhile05.class


BIN
JavaSe01/day03/target/classes/TestFor03.class


BIN
JavaSe01/day03/target/classes/TestForFor06.class


BIN
JavaSe01/day03/target/classes/TestMath.class


BIN
JavaSe01/day03/target/classes/TestScanner.class


BIN
JavaSe01/day03/target/classes/TestSwitch01.class


BIN
JavaSe01/day03/target/classes/TestSwitch02.class


BIN
JavaSe01/day03/target/classes/TestWhile04.class


BIN
JavaSe01/out/production/day01/Test02.class


BIN
JavaSe01/out/production/day02/Exer01.class


BIN
JavaSe01/out/production/day02/Exer02.class


BIN
JavaSe01/out/production/day02/Exer03.class


BIN
JavaSe01/out/production/day02/Exer04.class


BIN
JavaSe01/out/production/day02/Exer05.class


BIN
JavaSe01/out/production/day02/Main.class


BIN
JavaSe01/out/production/day02/Operator01.class


BIN
JavaSe01/out/production/day02/Operator02.class


BIN
JavaSe01/out/production/day02/Operator03.class


BIN
JavaSe01/out/production/day02/Operator04.class


BIN
JavaSe01/out/production/day02/Operator05.class


BIN
JavaSe01/out/production/day02/Operator06.class


BIN
JavaSe01/out/production/day02/Operator07.class


BIN
JavaSe01/out/production/day02/Operator08.class


BIN
JavaSe01/out/production/day02/Operator09.class


BIN
JavaSe01/out/production/day02/Operator10.class


BIN
JavaSe01/out/production/day02/Operator11.class


BIN
JavaSe01/out/production/day02/Operator12.class


BIN
JavaSe01/out/production/day02/Operator13.class