Ask Question
12 June, 00:17

Write a complete java program that will display the word CS and the number 140, each on its own line.

+5
Answers (1)
  1. 12 June, 02:31
    0
    The code will contain only the main class.

    Note that to print two lines using only one command, we will use "/n" command.

    The code will be as follows:

    public class PrintSeparateLines {

    public static void main (String[]args)

    {

    System. out. println ("CS" + "/n" + "140");

    }

    }

    The output of this code will be:

    CS

    140
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a complete java program that will display the word CS and the number 140, each on its own line. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers