What is the main advantage of passing argument by reference?
Answer / Sunil Kumar Rastogi
The main advantage of passing arguments by reference in Core Java (or any language that supports pass-by-reference) is that it allows modifying the original variable's value within a function. This can make the code more efficient and easier to manage, especially when dealing with complex data structures.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is public static void main?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
What is the purpose of finalization?
11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.
Difference String and String Buffer
What is the purpose of an interface?
What java ide should I use?
How do you add an element to a hashset in java?
which class to use when concatenating strings in a loop.
In a my eclipse editor if i want to switch from jdk 1.4 to jdk 1.6 how to do that???? Initially i have jdk1.4
Explain JMS in detail.
What are disadvantages of java?