Computer Applications
Write the output for the following:
System.out.println("Incredible"+"\n"+"world");
Java
Input in Java
ICSE 2018
32 Likes
Answer
Output of the above code is:
Incredible
world
\n is the escape sequence for newline so Incredible and world are printed on two different lines.
Answered By
17 Likes
Related Questions
What are the various types of errors in Java?
What is meant by a package? Give an example.
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)