You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.5 KiB

## HelloWorld
### Setup
Install the [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
The files for each exercise will be submitted in a single directory. For example, the directory for this exercise will be `HelloWorld`, and the path to the file will be `HelloWorld/HelloWorld.java`.
You will need to compile your code if you intend to test it:
```shell
javac *.java -d build
```
Then run the following command :
```shell
java -cp build ExerciseRunner
```
You can use any IDE or text editor, though IDEA IntelliJ or JetBrains are specially dedicated and recommended.
To edit your code, you can use any IDE or text editor, though IDEA IntelliJ or JetBrains are specially dedicated and recommended.
On Gitea, create a repository named `((ROOT))`. Each of your exercises will have its own directory, with a name matching the exercise. That directory will contain all of the files for that exercise.
### Instructions
Create a file `HelloWorld.java` in a directory named `HelloWorld`.
Write a function `helloWorld` that returns the string 'Hello World !'.
### Expected Functions
```java
public class HelloWorld {
public static String helloWorld() {
// your code here
}
}
```
### Usage
Here is a possible ExerciseRunner.java to test your function :
```java
public class ExerciseRunner {
public static void main(String[] args) {
System.out.println(HelloWorld.helloWorld());
}
}
```
and its output :
```shell
$ javac *.java -d build
$ java -cp build ExerciseRunner
Hello World !
$
```