aboalochaq2007oy1ebv aboalochaq2007oy1ebv
  • 18-10-2017
  • Computers and Technology
contestada

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

Respuesta :

Louli
Louli Louli
  • 25-10-2017
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
Answer Link

Otras preguntas

***TOP SAYS BAND AND PLAY INSTRUMENT AND NOT IN BAND AND PLAY INSTRUMENT***** A survey asked 50 students if they play an instrument and if they are in band. 1.
Why is King’s selection of the memoir form for his work On Writing particularly appropriate?
Factors that a scientist chooses to keep constant over the course of the experiment are called?
The following paragraph has not been edited
you are playing catch with a friend and you are standing 90 feet from him. how many yards away are you standing?
Who are the main character in Stargirl?
Teresa is a new student at Sara’s school. Read the conversation below and choose the phrase that is not correctly used.
Identify the problem with the following study. A local newspaper published the results of a study that claimed "482 people use the public library". The study wa
What are possible values of x and y for two distinct points, (5,-2) And (x,y) to represent a function
Help me please thank you