Computer Applications
Write two differences between System.out.print() and System.out.println()
Input in Java
2 Likes
Answer
| System.out.print() | System.out.println() |
|---|---|
| It prints data to the console but the cursor remains at the end of the data in the same line. | It prints data to the console and places the cursor in the next line. |
| Next printing takes place from the same line. | Next printing takes place from next line. |
Answered By
1 Like
Related Questions
Answer the following:
(a) Scanner class method to accept a character.
(b) Jump statement which stops the execution of a construct.
Raj was asked to accept the phone number which has 10 digits, using the appropriate method of Scanner class. Which of the following statement he must choose?
- Ob.nextInt()
- Ob.nextDouble()
- Ob.nextLong()
- Ob.next().chatAt(0)
What is meant by a package? Give an example.