OOPS and Core Java Interview Question and Answers
29. | How can we force the garbage collector to run? |
---|---|
Garbage collector can be run forcibly using "System.gc()" or "Runtime.gc()". | |
30. | How can you copy one array in to a different array? |
---|---|
System.arraycopy(myOldArray, 0, myNewArray, 0, length); | |
31. | Distinguish between String class and StringBuffer class in Java in terms of their implementations? |
---|---|
|
|
32. | How can we implement polymorphism in Java? |
---|---|
|
|