Updated the sample to use the System.console().