There is nothing "hidden from public" concerning java.util.Scanner
.
@shmosel already linked to the source of it, @Stultuske pointed out, that there are various websites covering source code of java.
Modern IDEs also allow you to view into source for your libraries (aka .jar
files).
My Netbeans IDE shows source from known jar
files whenever I ctrl-click on a class.
Same goes with Eclipse, IntelliJ, ...
For a lot of open-source libraries (e.g. from Apache) there is also source code available. Just by cloning the version control repository, downloading source packages (zip
, ...-source.jar
) or browsing the version control repository online.
If project is buildable with maven, the IDE can even download and show sources for open source project automatically.