[BAEL-1835] Added dummy KotlinService
This commit is contained in:
parent
2059cb13a4
commit
b9e6222ced
|
@ -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;
|
||||
|
|
|
@ -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!'");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package com.baeldung.mavenjavakotlin
|
||||
|
||||
class KotlinService {
|
||||
|
||||
fun sayHello() {
|
||||
System.out.println("Kotlin says 'Hello World!'")
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue