Initial commit
This commit is contained in:
6
hello.java
Normal file
6
hello.java
Normal 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
29
test-2048/.gitignore
vendored
Normal 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
8
test-2048/.idea/.gitignore
generated
vendored
Normal 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
6
test-2048/.idea/misc.xml
generated
Normal 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
8
test-2048/.idea/modules.xml
generated
Normal 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
10
test-2048/src/Main.java
Normal 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());
|
||||
}
|
||||
}
|
||||
23
test-2048/src/Student.java
Normal file
23
test-2048/src/Student.java
Normal 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;
|
||||
}
|
||||
}
|
||||
13
test-2048/src/StudentTool.java
Normal file
13
test-2048/src/StudentTool.java
Normal 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;
|
||||
}
|
||||
}
|
||||
15
test-2048/src/mode1/Demo1.java
Normal file
15
test-2048/src/mode1/Demo1.java
Normal 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
11
test-2048/test-2048.iml
Normal 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
29
test-idea/.gitignore
vendored
Normal 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
8
test-idea/.idea/.gitignore
generated
vendored
Normal 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
5
test-idea/.idea/misc.xml
generated
Normal 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
8
test-idea/.idea/modules.xml
generated
Normal 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>
|
||||
9
test-idea/src/Demo1Constant.java
Normal file
9
test-idea/src/Demo1Constant.java
Normal 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
7
test-idea/src/Main.java
Normal 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
14
test-idea/src/input.java
Normal 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
11
test-idea/test-idea.iml
Normal 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>
|
||||
Reference in New Issue
Block a user