Section 2.2: The print and println Methods, and the Java API

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

In Java, an argument is: A: A logical sequence of statements proving the correctness of a program B: Information that a method returns to its caller C: Information provided to a method D: A verbal dispute

C: Information provided to a method

Write a statement that prints Hello, world on to the screen.

System.out.println("Hello, world");

Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space and your first name.

System.out.println("Turing, Alan");

The character escape sequence to represent a double quote is:

\"

The character escape sequence top represent a single quote is:

\'

The character escape sequence to represent a backslash is:

\\

The character escape sequence to force the cursor to go to the next line is:

\n

The character escape sequence to force the cursor to advance forward to the next tab setting is:

\t

Suppose your name was George Gershwin. Write a complete main method that would print your last name, followed by a comma, followed by a space and your first name.

public static void main(String[ ] a) { System.out.println("Gershwin, George"); }

Write a complete main method that prints Hello, world to the screen.

public static void main(String[ ] a) { System.out.println("Hello, world"); }


संबंधित स्टडी सेट्स

Chapter 10 Quality Control Operations Management 12e Stevenson

View Set

Chapter 15 - Information Technology

View Set

Cloud Computing & Cybersecurity Final

View Set

ISC2 Certified in Cybersecurity Exam Questions

View Set

TIM 102. CHAPTER 15. REGIONAL AMERICAS

View Set