Java is based on pass by reference or pass by value ..

Answers were Sorted based on User's Feedback



Java is based on pass by reference or pass by value ....

Answer / eyal roth

Pass by value.

Is This Answer Correct ?    15 Yes 4 No

Java is based on pass by reference or pass by value ....

Answer / venkatesh

Java supports both Pass By Value and Pass By Reference
Pass By Value: In Java method pass value , changed value is
visible within a method, it will not effect outside of the
method

Pass By Reference: Pass Java Object in method , changed
value will be available outside of method also.

Is This Answer Correct ?    9 Yes 5 No

Java is based on pass by reference or pass by value ....

Answer / arun

Java is actually pass-by-value for all variables running
within a single
VM. Pass-by-value means pass-by-variable-value. And that
means, pass-by-copy-of-
the-variable!

Is This Answer Correct ?    1 Yes 0 No

Java is based on pass by reference or pass by value ....

Answer / dheeraj pareek

Java is purely based on "Pass-by-value".
Variables are passed by value, and in case of Object, object reference is passed by value.

Is This Answer Correct ?    0 Yes 0 No

Java is based on pass by reference or pass by value ....

Answer / sanket mehta

Java does not support call by reference because in call by reference we need to pass the address and address are stored in pointers n java does not support pointers and it is because pointers breaks the security. Java is always pass-by-value. Pass by reference in java means the passing the address itself

Is This Answer Correct ?    0 Yes 0 No

Java is based on pass by reference or pass by value ....

Answer / guest

by reference.

Is This Answer Correct ?    3 Yes 13 No

Post New Answer

More Core Java Interview Questions

What is equlas() and hashcode() contract in java? Where does it used?

0 Answers  


why abstract class will have a constructor?

4 Answers  


If I will write String s=new String("XYZ"); String s1=new String("XYZ"); if(s.equals(s1)){ sop("True"); } else{ sop("False"); } This program will give me "True". But When I am creating my own class suppose class Employee{ public Employee(String name); } Employee e= new Employee("XYZ"); Employee e1 = neew Employee("XYZ"); if(e.equals(e1)){ sop("True"); } else{ sop("False"); } Then it will give the output as "False". Can I know what is happening internally?

5 Answers  


Is there memory leaks in java?

3 Answers  


What function extracts specified characters from a string?

0 Answers  


Which class has no duplicate elements?

8 Answers  


Is 0 true or is 1 true?

0 Answers  


What are the types of relation?

0 Answers  


What is java instanceof operator?

0 Answers  


Explain about collection interface in java?

0 Answers  


What is difference between overloading and overriding?

2 Answers   Accenture,


What is ascii format?

0 Answers  


Categories