mirror of https://github.com/01-edu/public.git
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.
37 lines
614 B
37 lines
614 B
8 months ago
|
## GoodbyeMars
|
||
8 months ago
|
|
||
|
### Instructions
|
||
|
|
||
8 months ago
|
In a file named `GoodbyeMars.java` write a function `goodbyeMars` that returns the string 'Goodbye Mars !'.
|
||
8 months ago
|
|
||
|
### Expected Functions
|
||
|
|
||
|
```java
|
||
8 months ago
|
public class GoodbyeMars {
|
||
|
public static String goodbyeMars() {
|
||
8 months ago
|
// your code here
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
### Usage
|
||
|
|
||
8 months ago
|
Here is a possible `ExerciseRunner.java` to test your function :
|
||
8 months ago
|
|
||
|
```java
|
||
|
public class ExerciseRunner {
|
||
|
public static void main(String[] args) {
|
||
8 months ago
|
System.out.println(GoodbyeMars.goodbyeMars());
|
||
8 months ago
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
and its output :
|
||
|
|
||
|
```shell
|
||
|
$ javac *.java -d build
|
||
|
$ java -cp build ExerciseRunner
|
||
8 months ago
|
Goodbye Mars !
|
||
8 months ago
|
$
|
||
8 months ago
|
```
|