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 |
How to instantiate static nested classes in java?
What is rule of accessibility in java?
Explain how hashmap works?
what is meant by Byte code concept in Java?
How do you declare an array in java?
What is native code?
What is the tradeoff between using an unordered array versus an ordered array?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
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?
What is string buffer?
Why string is a class?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?