Skip to content

Commit a89b1a8

Browse files
init java language
1 parent 1d93b7c commit a89b1a8

File tree

5 files changed

+135
-0
lines changed

5 files changed

+135
-0
lines changed

Java/.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Maven template
3+
target/
4+
pom.xml.tag
5+
pom.xml.releaseBackup
6+
pom.xml.versionsBackup
7+
pom.xml.next
8+
release.properties
9+
dependency-reduced-pom.xml
10+
buildNumber.properties
11+
.mvn/timing.properties
12+
13+
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
14+
!/.mvn/wrapper/maven-wrapper.jar
15+
### Java template
16+
# Compiled class file
17+
*.class
18+
19+
# Log file
20+
*.log
21+
22+
# BlueJ files
23+
*.ctxt
24+
25+
# Mobile Tools for Java (J2ME)
26+
.mtj.tmp/
27+
28+
# Package Files #
29+
*.jar
30+
*.war
31+
*.ear
32+
*.zip
33+
*.tar.gz
34+
*.rar
35+
36+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
37+
hs_err_pid*
38+
### Example user template template
39+
### Example user template
40+
41+
# IntelliJ project files
42+
.idea
43+
*.iml
44+
out
45+
gen

Java/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0modelVersion>
4+
5+
<groupId>com.supercoderhawkgroupId>
6+
<artifactId>leetcodeartifactId>
7+
<version>1.0-SNAPSHOTversion>
8+
<packaging>jarpackaging>
9+
10+
<name>leetcodename>
11+
<url>https://github.com/supercoderhawk/leetcodeurl>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
15+
properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>junitgroupId>
20+
<artifactId>junitartifactId>
21+
<version>4.12version>
22+
<scope>testscope>
23+
dependency>
24+
dependencies>
25+
project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.supercoderhawk;
2+
3+
/**
4+
* Hello world!
5+
*
6+
*/
7+
public class App
8+
{
9+
public static void main( String[] args )
10+
{
11+
System.out.println( "Hello World!" );
12+
}
13+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.supercoderhawk;
2+
3+
public class Solution_1_10 {
4+
/**
5+
* problem 1
6+
* @param nums: 输入数组
7+
* @param target: 目标和
8+
* @return: 目标和的索引数组
9+
*/
10+
public int[] twoSum(int[] nums, int target) {
11+
return new int[]{1,2};
12+
}
13+
14+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.supercoderhawk;
2+
3+
import junit.framework.Test;
4+
import junit.framework.TestCase;
5+
import junit.framework.TestSuite;
6+
7+
/**
8+
* Unit test for simple App.
9+
*/
10+
public class AppTest
11+
extends TestCase
12+
{
13+
/**
14+
* Create the test case
15+
*
16+
* @param testName name of the test case
17+
*/
18+
public AppTest( String testName )
19+
{
20+
super( testName );
21+
}
22+
23+
/**
24+
* @return the suite of tests being tested
25+
*/
26+
public static Test suite()
27+
{
28+
return new TestSuite( AppTest.class );
29+
}
30+
31+
/**
32+
* Rigourous Test :-)
33+
*/
34+
public void testApp()
35+
{
36+
assertTrue( true );
37+
}
38+
}

0 commit comments

Comments
 (0)