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
> If you're testing a classcalled `SomeClassName` then your test classshould be called `SomeClassNameTest`.
124
-
124
+
>
125
125
> The exception to this is if the tests are split into several test classes where each test classtests different functionality. In that case each classshould be named `SomeClassNameFunctionalityTest` where `Functionality` is the name of the functionality to be tested in that class. See the [clock exercise](https://github.com/exercism/java/tree/main/exercises/practice/clock) as an example.
> According to the starter implementation policy, any exercise with difficulty 4 or lower should have starter implementation.
132
132
> Any exercise with difficulty 5 or above will have no starter implementation (unless its signature is very complicated).
133
133
> This could be confusing to users when tackling their first exercise with difficulty 5 when they are used to starter implementation being provided.
134
-
134
+
>
135
135
> Therefore a hints.md file should be added to the .meta directory for every exercise with difficulty 5.
136
136
> This file should explain what they need to do when there is no starter implementation.
137
137
> The files should all be the same so you can copy it from any other exercise with difficulty 5, e.g. [flatten-array](https://github.com/exercism/java/tree/main/exercises/pratice/flatten-array/.meta/hints.md).
138
-
138
+
>
139
139
> We add the file to every exercise with difficulty 5 because the structure of the track means that we don't know which exercise will be the first one without starter implementation that a user will be faced with.
> When an error has occured or a method can't return anything, the canonical data will just mark that as `"expected": null`.
155
155
> This is because error handling varies from language to language, so the canonical data is leaving it up to each language track to decide how to deal with those situations.
156
156
> It doesn't mean that the method needs to return `null`.
157
-
157
+
>
158
158
> In Java it's considered bad practice to return `null`.
159
159
> If you return `null` then the user of the method has to remember to check for `null` and they have to look at the implementation of the method to find out that this is necessary.
160
-
160
+
>
161
161
> It's considered best practice to deal with errors and unexpected circumstances by throwing exceptions.
162
162
> If you throw an exception then you force the user to deal with the problem.
163
163
> You can either define your own exception (see [the triangle exercise](https://github.com/exercism/java/blob/main/exercises/practice/triangle/.meta/src/reference/java/TriangleException.java) for an example) or use a predefined one (see [the collatz-conjecture exercise](https://github.com/exercism/java/blob/main/exercises/practice/collatz-conjecture/src/test/java/CollatzCalculatorTest.java) for an example).
164
-
164
+
>
165
165
> Another option is to use [Optionals](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html).
166
166
> This can be more suitable if the case you want to deal with isn't an exceptional occurence, but rather an expected scenario, e.g. a search method not finding what it was searching for.
167
167
> See [the word-search exercise](https://github.com/exercism/java/blob/main/exercises/practice/word-search/src/test/java/WordSearcherTest.java) for an example where `Optional` is used.
Copy file name to clipboardexpand all lines: docs/ABOUT.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
# About
2
2
3
-
[Java](https://go.java/index.html) is among the most popular available programming languages, thanks to its versatility and compatibility.
3
+
[Java](https://go.java/index.html) is among the most popular available programming languages, thanks to its versatility and compatibility.
4
4
It is widely used for software development, mobile applications and developing larger systems.
5
5
6
-
Java was born in 1995 and is maintained by [Oracle](https://www.oracle.com/index.html).
7
-
Despite the fact that it isn't as young as some of the fresh languages out there, Java is still really popular.
8
-
It was designed to be fast, secure, reliable, beginner-friendly and highly portable.
9
-
This portability perk exists because Java is executed on a cross-platform compatible [Java Virtual Machine - JVM](https://en.wikipedia.org/wiki/Java_virtual_machine).
10
-
Android apps are also developed using Java, since the [Android Operating System](https://en.wikipedia.org/wiki/Android_(operating_system)) runs on a Java language environment.
6
+
Java was born in 1995 and is maintained by [Oracle](https://www.oracle.com/index.html).
7
+
Despite the fact that it isn't as young as some of the fresh languages out there, Java is still really popular.
8
+
It was designed to be fast, secure, reliable, beginner-friendly and highly portable.
9
+
This portability perk exists because Java is executed on a cross-platform compatible [Java Virtual Machine - JVM](https://en.wikipedia.org/wiki/Java_virtual_machine).
10
+
Android apps are also developed using Java, since the [Android Operating System](<https://en.wikipedia.org/wiki/Android_(operating_system)>) runs on a Java language environment.
11
11
12
12
The Java community is huge!
13
-
GitHub for example has over 1.5 million Java projects.
14
-
It's also worth mentioning that Java has the second largest community in [StackOverflow](https://stackoverflow.com/questions/tagged/java)!
13
+
GitHub for example has over 1.5 million Java projects.
14
+
It's also worth mentioning that Java has the second largest community in [StackOverflow](https://stackoverflow.com/questions/tagged/java)!
15
15
This is important because the larger a programming language community is, the more support you'd be likely to get.
16
16
17
17
Java also has a powerful and well-designed set of built-in [APIs - Application Programming Interfaces](https://docs.oracle.com/en/java/javase/11/docs/api/index.html), which can be used for various activities like Database connection, networking, I/O, XML parsing, utilities, and much more.
0 commit comments