sajeer assiz

Greenhorn
+ Follow
since Sep 30, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sajeer assiz

public static void main(String[] args) {
String data = "a";
System.out.println(data);
Append(data);
System.out.println(data);
}
public static void Append(String data) {
data = data + "b";
System.out.println(data);
}
--------------------- --------------------
here append is called as call by value , variable data is local to append only. variable data at main is locl to main, what happen here is a new variable is created at append and intialized with value "a" and concatenated with "b" which is local to append so not reflected in the variable at main because both are different
[ October 04, 2004: Message edited by: sajeer assiz ]
19 years ago