[BAEL-1835] Added dummy KotlinService

This commit is contained in:
dupirefr 2018-07-07 09:50:51 +02:00
parent 2059cb13a4
commit b9e6222ced
3 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import com.baeldung.mavenjavakotlin.services.JavaService;
public class Application {
private static final String JAVA = "java";
private static final String KOTLIN = "kotlin";
public static void main(String[] args) {
String language = args[0];
@ -12,6 +13,9 @@ public class Application {
case JAVA:
new JavaService().sayHello();
break;
case KOTLIN:
new KotlinService().sayHello();
break;
default:
// Do nothing
break;

View File

@ -3,7 +3,7 @@ package com.baeldung.mavenjavakotlin.services;
public class JavaService {
public void sayHello() {
System.out.println("Java says 'Hello!'");
System.out.println("Java says 'Hello World!'");
}
}

View File

@ -0,0 +1,9 @@
package com.baeldung.mavenjavakotlin
class KotlinService {
fun sayHello() {
System.out.println("Kotlin says 'Hello World!'")
}
}