Run ❯
Get your
own Java
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
public class Main { public static void main(String[] args) { String text = "Hello"; try { int myNum = Integer.parseInt(text); System.out.println(myNum); } catch (NumberFormatException e) { System.out.println("The text is not a valid number."); } } }
The text is not a valid number.