How do you do a line break in java?



How do you do a line break in java?..

Answer / Yadul Rani

"To create a new line in Java, you can use the "n" escape sequence:nExample: System.out.println("HellonWorld");"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How to instantiate static nested classes in java?

1 Answers  


What is rule of accessibility in java?

1 Answers  


Explain how hashmap works?

1 Answers  


what is meant by Byte code concept in Java?

1 Answers   Aspire,


How do you declare an array in java?

1 Answers  


What is native code?

1 Answers  


What is the tradeoff between using an unordered array versus an ordered array?

1 Answers  


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

1 Answers  


public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?

6 Answers  


What is string buffer?

1 Answers  


Why string is a class?

1 Answers  


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1 Answers  


Categories