Call by Value and Call by Reference in Java
Example of call by value in java
Output:before change 50
after change 50
Another Example of call by value in javaIn case of call by reference original value is changed if we made changes in the called method. If we pass object in place of any primitive value, original value will be changed. In this example we are passing object as a value. Let's take a simple example: Output:before change 50
after change 150
Next Topicstrictfp keyword |

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India










