Skip to content
New Line
Profile icon
talynnhardy

How to start a new line? Is my coding correct so far? Please let me know.

You are viewing a single comment. View All
Answered by RYANTADIPARTHI [earned 5 cycles]
View Answer
Profile icon
IntellectualGuy

Easy just put \n

class Main { public static void main(String[] args) { System.out.print("Enter the monthly subscription fee:\n"); System.out.print("9.99"); System.out.print("Enter the number of paying customers:\n"); System.out.print("26000000"); System.out.print("This company makes $259740000 per month"); System.out.print("This company makes $3116880000 per year"); } }

or you could write System.out.println instead of System.out.print, both of those should work


Btw I suggest using proper indentation in java, it can make your code way easier to read