You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this is your first Java exercise, we've included a detailed [Tutorial](#tutorial)
4
-
that guides you through your solution. Check it out for tips and
5
-
assistance!
3
+
Since this is your first Java exercise, we've included a detailed [Tutorial] that guides you through your solution. Check it out for tips and assistance!
6
4
7
5
## Tutorial
8
6
9
7
### Table of Contents
10
8
11
-
-[Introduction](#introduction)
12
-
-[Exercise Structure](#exercise-structure)
13
-
-[Solving "Hello, World!"](#solving-hello-world)
14
-
-[Step 1: Fix the solution](#step-1-fix-the-solution)
15
-
-[Step 2: Run the tests](#step-2-run-the-tests)
16
-
-[Step 3: Submitting your first iteration](#step-3-submitting-your-first-iteration)
17
-
-[Next steps](#next-steps)
9
+
-[Introduction]
10
+
-[Exercise Structure]
11
+
-[Solving "Hello, World!"]
12
+
-[Step 1: Fix the solution]
13
+
-[Step 2: Run the tests]
14
+
-[Step 3: Submitting your first iteration]
15
+
-[Next steps]
18
16
19
17
### Introduction
20
18
21
19
Welcome to the first exercise on the Java track!
22
20
23
-
This document is a step-by-step guide to solving this exercise. The
24
-
instructions should work equally well on Windows, macOS and Linux.
21
+
This document is a step-by-step guide to solving this exercise.
22
+
The instructions should work equally well on Windows, macOS and Linux.
25
23
26
-
Even if you are already familiar with Java basics, stepping through this guide
27
-
may be helpful as it will help you understand the output from the tool, Gradle,
28
-
that we use to compile and test our code, as well as introduce some of the
29
-
patterns common to all exercises in this track.
24
+
Even if you are already familiar with Java basics, stepping through this guide may be helpful as it will help you understand the output from the tool, Gradle, that we use to compile and test our code, as well as introduce some of the patterns common to all exercises in this track.
30
25
31
26
### Exercise Structure
32
27
33
28
When you fetch a new Java exercise, you will receive:
34
29
35
-
-__one or more test files__ (always). These live in the `src/test/java`
36
-
directory and define a set of tests that our solution must satisfy before we
37
-
can safely declare that it is working.
38
-
-__one or more starter files__ (initially). If provided, these live in the
39
-
`src/main/java` directory and define shells of the classes you will need
40
-
in order to solve the current problem.
30
+
-__one or more test files__ (always).
31
+
These live in the `src/test/java` directory and define a set of tests that our solution must satisfy before we can safely declare that it is working.
32
+
-__one or more starter files__ (initially).
33
+
If provided, these live in the `src/main/java` directory and define shells of the classes you will need in order to solve the current problem.
41
34
42
35
### Solving "Hello, World!"
43
36
44
-
You can use our online editor to solve your solution and run the tests, but
45
-
if you want to solve the problem and run tests locally check these links below:
37
+
You can use our online editor to solve your solution and run the tests, but if you want to solve the problem and run tests locally check these links below:
46
38
47
-
-[Installing Java and Gradle](https://exercism.org/docs/tracks/java/installation)
-[Testing locally on the java track](https://exercism.org/docs/tracks/java/tests)
39
+
-[Installing Java]
40
+
-[Working Locally]
41
+
-[Testing locally on the java track]
50
42
51
43
### Step 1: Fix the solution
52
44
@@ -66,73 +58,78 @@ After making corrections and implementing your solution, run the tests again.
66
58
You can run the tests using the online editor or locally on your machine:
67
59
68
60
- To run the tests in the online editor, click the "Run Tests" button.
69
-
- To run the tests locally, check [Testing on the Java track](https://exercism.org/docs/tracks/java/tests)
70
-
If the tests fails, that's ok! See what the error message is telling you, change your code and test again.
71
-
When your tests pass, move on to the next step.
61
+
- To run the tests locally, check [Testing on the Java track][Testing locally on the java track] If the tests fails, that's ok! See what the error message is telling you, change your code and test again, when your tests pass, move on to the next step.
72
62
73
63
### Step 3: Submitting your first iteration
74
64
75
-
With a working solution that we've reviewed, we're ready to submit it to
76
-
exercism.org.
77
-
You can submit the solution using the online editor or locally using the [Exercism CLI](https://exercism.org/docs/using/solving-exercises/working-locally):
65
+
With a working solution that we've reviewed, we're ready to submit it to exercism.org.
66
+
You can submit the solution using the online editor or locally using the [Exercism CLI][Working Locally]:
78
67
79
-
- To submit the exercise locally, first [install the exercism CLI](https://exercism.org/docs/using/solving-exercises/working-locally)if you haven't already and then submit the files of your solution, e.g:
68
+
- To submit the exercise locally, first [install the exercism CLI][Working Locally]if you haven't already and then submit the files of your solution, e.g:
80
69
81
-
```sh
82
-
exercism submit <file location>
83
-
```
70
+
```sh
71
+
exercism submit <file location>
72
+
```
84
73
85
-
replace `<file location>` with the relative location of your hello-world.java file.
86
-
so if you are working in "C:\exercism\java\hello-world" then the command would be
74
+
- Replace `<file location>` with the relative location of your `Greeter.java` file, so if you are working in `C:\exercism\java\hello-world` then the command would be
87
75
88
-
```sh
89
-
exercism submit .\src\main\java\Blackjack.java
90
-
```
76
+
```sh
77
+
exercism submit .\src\main\java\Greeter.java
78
+
```
91
79
92
80
- If you want to use the online editor to submit your solution, just click the "Submit" button!
93
81
94
82
For a closer look at submitting a solution locally:
0 commit comments