diff options
Diffstat (limited to 'java/project/src/main')
-rw-r--r-- | java/project/src/main/ch/asynk/Main.java | 22 | ||||
-rw-r--r-- | java/project/src/main/ch/asynk/MyClass.java | 25 | ||||
-rw-r--r-- | java/project/src/main/ch/asynk/MyException.java | 11 |
3 files changed, 58 insertions, 0 deletions
diff --git a/java/project/src/main/ch/asynk/Main.java b/java/project/src/main/ch/asynk/Main.java new file mode 100644 index 0000000..bb187bf --- /dev/null +++ b/java/project/src/main/ch/asynk/Main.java @@ -0,0 +1,22 @@ +package ch.asynk; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Main +{ + private static Logger logger = null; + + public static void main(String [] args ) + { + logger = LoggerFactory.getLogger(Main.class); + System.out.println("System.out"); + System.err.println("System.err"); + logger.trace("trace"); + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + System.exit(0); + } +} diff --git a/java/project/src/main/ch/asynk/MyClass.java b/java/project/src/main/ch/asynk/MyClass.java new file mode 100644 index 0000000..57ef46f --- /dev/null +++ b/java/project/src/main/ch/asynk/MyClass.java @@ -0,0 +1,25 @@ +package ch.asynk; + +import lombok.Getter; + +public class MyClass +{ + static private String msg = "Hello World"; + + private @Getter int n; + + public MyClass() + { + n = 666; + } + + public void print() + { + System.err.println(msg); + } + + public void exception() throws MyException + { + throw new MyException("it's mine"); + } +} diff --git a/java/project/src/main/ch/asynk/MyException.java b/java/project/src/main/ch/asynk/MyException.java new file mode 100644 index 0000000..06203ae --- /dev/null +++ b/java/project/src/main/ch/asynk/MyException.java @@ -0,0 +1,11 @@ +package ch.asynk; + +public class MyException extends Exception +{ + private static final long serialVersionUID = 01235; + + public MyException(String message) + { + super(message); + } +} |