Run ❯
Get your
own Java
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
public class Main { public static void main(String[] args) { String words = "One Two Three Four"; int countWords = words.split("\\s").length; System.out.println(countWords); } }
4