Initial commit

This commit is contained in:
syx_computer
2025-09-30 13:20:26 +08:00
commit fd230339bd
18 changed files with 220 additions and 0 deletions

6
hello.java Normal file
View File

@@ -0,0 +1,6 @@
public class hello {
public static void main(String[] args) {
System.out.println("helloworld");
}
}

29
test-2048/.gitignore vendored Normal file
View File

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

8
test-2048/.idea/.gitignore generated vendored Normal file
View File

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

6
test-2048/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
test-2048/.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/test-2048.iml" filepath="$PROJECT_DIR$/test-2048.iml" />
</modules>
</component>
</project>

10
test-2048/src/Main.java Normal file
View File

@@ -0,0 +1,10 @@
import javax.swing.*;
public class Main {
public static void main(String[] args) {
StudentTool studentTool = new StudentTool();
Student student = studentTool.getStudent();
//student.getName();
System.out.println(student.getName() + "---" + student.getAge());
}
}

View File

@@ -0,0 +1,23 @@
public class Student {
private String name;
private int age;
public String getName(){
return name;
}
public int getAge(){
return age;
}
public void setName(String name){
this.name = name;
}
public void setAge(int age){
this.age = age;
}
public Student(){
}
public Student(String name, int age){
this.name = name;
this.age = age;
}
}

View File

@@ -0,0 +1,13 @@
import java.util.Scanner;
public class StudentTool {
public Student getStudent(){
Scanner scanner = new Scanner(System.in);
System.out.println("输入姓名");
String name = scanner.next();
System.out.println("输入年龄");
int age = scanner.nextInt();
Student student = new Student(name, age);
return student;
}
}

View File

@@ -0,0 +1,15 @@
package mode1;
import java.util.Random;
public class Demo1 {
public static void main(String[] args) {
Random random = new Random();
int num = random.nextInt(10);
System.out.println(num);
}
}

11
test-2048/test-2048.iml Normal file
View File

@@ -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>

29
test-idea/.gitignore vendored Normal file
View File

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

8
test-idea/.idea/.gitignore generated vendored Normal file
View File

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

5
test-idea/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
test-idea/.idea/modules.xml generated Normal file
View File

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

View File

@@ -0,0 +1,9 @@
public class Demo1Constant {
public static void main(String[] args) {
System.out.println(true);
System.out.println("nihao");
System.out.println('a');
System.out.println(1);
System.out.println(10 > 20);
}
}

7
test-idea/src/Main.java Normal file
View File

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

14
test-idea/src/input.java Normal file
View File

@@ -0,0 +1,14 @@
import java.util.Scanner;
public class input {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("你的名字:");
String name = scanner.next();
System.out.print("你的年龄:");
int a = scanner.nextInt();
System.out.println("你的名字是"+name+" 你的年龄是"+a);
}
}

11
test-idea/test-idea.iml Normal file
View File

@@ -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>