Answers for "how to print output number in different line in java"

1

how to print multiple lines in java

System.out.println("Players take turns marking a square."
+ "\nOnly squares not already marked can be picked."
+ "\nOnce a player has marked three squares in a row, he or she wins!"
+ "\nIf all squares are marked and no three squares are the same, a tied game is declared."
+ "\nHave Fun!");
Posted by: Guest on September-02-2021
0

print line number java

System.out.println("I'm in line #" + 
    new Exception().getStackTrace()[0].getLineNumber());
Posted by: Guest on January-09-2022

Code answers related to "how to print output number in different line in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language