[jdk20] RFR: 8297288: Example code in Scanner class [v2]

Alan Bateman alanb at openjdk.org
Mon Dec 12 17:15:37 UTC 2022


On Mon, 12 Dec 2022 17:11:54 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> The example in `Scanner` directly uses `System.in` which may cause unwanted behavior when the default charset and the console charset differ. Using `Console.reader()` is more appropriate. Also changed examples into snippets.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Modified @link comment in the snippet

Marked as reviewed by alanb (Reviewer).

-------------

PR: https://git.openjdk.org/jdk20/pull/14


More information about the core-libs-dev mailing list