Ask Question
18 September, 04:45

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

+4
Answers (1)
  1. 18 September, 04:58
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers