write a program to print message in different line? in java.
Answers
Answered by
1
Answer:
Modifying Your First Java Program
In this section, we modify the example in Fig. 2.1 to print text on one line by using multiple statements and to print text on several lines by using a single statement.
Displaying a Single Line of Text with Multiple Statements
Welcome to Java Programming! can be displayed several ways. Class Welcome2, shown in Fig. 2.3, uses two statements (lines 9–10) to produce the output shown in Fig. 2.1. [Note: From this point forward, we highlight the new and key features in
Answered by
2
Answer:
How to print multiple line messages using single printf in C...
- Example: This is line 1. ...
- Consider the program: #include <stdio.h> int main() { printf("This is line 1."); ...
- "\n" is a new line character, which can be used anywhere within the message written in printf() statement. ...
- Thanks for reading...
Hope it helps you mate!!
Similar questions
Chemistry,
24 days ago
Math,
24 days ago
Computer Science,
24 days ago
Physics,
9 months ago
English,
9 months ago