mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
feat(languages): add Java support
This commit is contained in:
3
challenges/hello-world/solutions/java/function/README.md
Normal file
3
challenges/hello-world/solutions/java/function/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# hello-world/java/function
|
||||
|
||||
Created by [@Divlo](https://github.com/Divlo) on 24 June 2021.
|
12
challenges/hello-world/solutions/java/function/Solution.java
Normal file
12
challenges/hello-world/solutions/java/function/Solution.java
Normal file
@ -0,0 +1,12 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Solution {
|
||||
public static void main(String[] args) {
|
||||
String line;
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
while(scanner.hasNextLine()) {
|
||||
line = scanner.nextLine();
|
||||
System.out.println("Hello, " + line + "!");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user