[jdk20] RFR: 8297288: Example code in Scanner class [v2]
Naoto Sato
naoto at openjdk.org
Mon Dec 12 17:15:39 UTC 2022
On Sat, 10 Dec 2022 08:15:49 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Modified @link comment in the snippet
>
> src/java.base/share/classes/java/util/Scanner.java line 58:
>
>> 56: * var con = System.console();
>> 57: * if (con != null) {
>> 58: * Scanner sc = new Scanner(con.reader()); // @link substring="reader()" target="java.io.Console#reader()"
>
> The link tag can be put on the previous line if you want. It just requires terminating it with a colon (":"). I've found that useful in a few places.
Thanks, Alan. It is indeed useful. Modified as suggested.
-------------
PR: https://git.openjdk.org/jdk20/pull/14
More information about the core-libs-dev
mailing list