Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
public class Main { public static void main(String[] args) { String myStr = "Hello %s! One kilobyte is %,d bytes."; String result = String.format(myStr, "World", 1024); System.out.println(result); } }
Hello World! One kilobyte is 1,024 bytes.