Ask Question
5 November, 12:48

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

+2
Answers (1)
  1. 5 November, 14:21
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers