how to scan the console in java using console() code example Example: read input from console variable = input()