Hello dev.java team!
I am writing to report some minor typos/small errors in the Interfaces, Records, and Packages short tutorials ( https://dev.java/learn/interfaces/ , https://dev.java/learn/records/ , https://dev.java/learn/packages/ ) in case the team is interested to rectify them.
In the latest version of the Interfaces short tutorial https://dev.java/learn/interfaces/ (archived as is at https://web.archive.org/web/20260422021726/https://dev.java/learn/interfaces/ ),
The TOC appears to accidentally duplicate a heading description:
- Interfaces
Using interfaces to design contracts that spells out how their software interacts.
- Implementing an Interface
Using interfaces to design contracts that spells out how their software interacts.
[exact repeat of "Interfaces" section description (seems unintentional)]
- Using an Interface as a Type
An interface defines a type
In the latest version of the Records short tutorial https://dev.java/learn/records/ (archived as is at https://web.archive.org/web/20260421223631/https://dev.java/learn/records/ )
- In two places, under "Using the Compact Constructor" and "Using the Canonical Constructor",
throwing an exception if end <= start is described as ensuring "End cannot be lesser than start" when in fact it is ensuring "End cannot be lesser than or equal to the start":
if (end <= start) {
throw new IllegalArgumentException("End cannot be lesser than start");
}
The message should be "End cannot be lesser than or equal to start" or "End must be greater than start".
Having a constructor that does not take any city is useful in your application. This can be another constructor, that only takes the state name and the capital city name.
"does not take any city" seems like it was intended to be "does not take any list of cities"
as the List<String> cities argument is the one that is being omitted in the additional constructor added in this example (while the String capitalCity argument remains).
In the latest version of the Packages short tutorial https://dev.java/learn/packages/ (archived as is at https://web.archive.org/web/20260421231030/https://dev.java/learn/packages/ )
Here iss how you would import the Rectangle class from the graphics package created in the previous section.
"Here iss" should be "Here is".
Thanks very much for all the excellent content (which is hardly affected by such issues), it is appreciated!
Hello dev.java team!
I am writing to report some minor typos/small errors in the Interfaces, Records, and Packages short tutorials ( https://dev.java/learn/interfaces/ , https://dev.java/learn/records/ , https://dev.java/learn/packages/ ) in case the team is interested to rectify them.
In the latest version of the Interfaces short tutorial https://dev.java/learn/interfaces/ (archived as is at https://web.archive.org/web/20260422021726/https://dev.java/learn/interfaces/ ),
The TOC appears to accidentally duplicate a heading description:
In the latest version of the Records short tutorial https://dev.java/learn/records/ (archived as is at https://web.archive.org/web/20260421223631/https://dev.java/learn/records/ )
throwing an exception if
end <= startis described as ensuring "End cannot be lesser than start" when in fact it is ensuring "End cannot be lesser than or equal to the start":The message should be "End cannot be lesser than or equal to start" or "End must be greater than start".
"does not take any city" seems like it was intended to be "does not take any list of cities"
as the
List<String> citiesargument is the one that is being omitted in the additional constructor added in this example (while theString capitalCityargument remains).In the latest version of the Packages short tutorial https://dev.java/learn/packages/ (archived as is at https://web.archive.org/web/20260421231030/https://dev.java/learn/packages/ )
"Here iss" should be "Here is".
Thanks very much for all the excellent content (which is hardly affected by such issues), it is appreciated!