Inital Commit of simple hello world class that uses static{}
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
6
Java/StaticHelloWorld/.classpath
Normal file
6
Java/StaticHelloWorld/.classpath
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
Java/StaticHelloWorld/.project
Normal file
17
Java/StaticHelloWorld/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>StaticHelloWorld</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
11
Java/StaticHelloWorld/.settings/org.eclipse.jdt.core.prefs
Normal file
11
Java/StaticHelloWorld/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
38
Java/StaticHelloWorld/src/com/HelloWolrd/Main.java
Normal file
38
Java/StaticHelloWorld/src/com/HelloWolrd/Main.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Main.java
|
||||
* @date Mar 10, 2012
|
||||
* @author ricky barrette
|
||||
* @author Twenty Codes, LLC
|
||||
*/
|
||||
package com.HelloWolrd;
|
||||
|
||||
/**
|
||||
* A sime hello world class
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
private final static String hello;
|
||||
|
||||
static{
|
||||
hello = "Hello, "+System.getProperties().getProperty("user.name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Main
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public Main() {
|
||||
assert hello != null;
|
||||
System.out.print(hello);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param args
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
new Main();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user