Explain pass by reference and pass by value?
Answer Posted / chinmay
passing the value instead of reference is known as pass by value,here primitive data should be given...
now pass by reference
Demo d=new Demo("abc");
Demo c=b;
here we pass the reference instead of value..
it is called pass by reference
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
What is the difference between path and classpath variables?
What is volatile keyword in java
How is the marker interface used in Java?
What are the advantages of arraylist over arrays?
how to split string in java?
What an i/o filter?
What if I write static public void instead of public static void in java?
Can a static block throw exception?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Can you override private or static method in java?
What is procedure overloading?
Define how does a try statement determine which catch clause should be used to handle an exception?
What is difference between path and classpath in java?
Can we write any code after throw statement?