Loading topic
jshell in a terminal. JShell is a tool for trying Java code one piece at a time. Enter the blocks in order in the same session. JShell may show extra feedback; the results described below are from the println calls.1 min readInteger.parseInt("42") to turn text into an integer, a whole number. Use String.valueOf(number) to turn the number back into text. If the text is not a valid integer, parseInt throws an error called NumberFormatException.1 min read