class letter{
char c;
}
//class
public class p41 {
//a function
static void funz(letter ch) {
ch.c='z';
}
public static void main(String[] args){
letter x=new letter();
x.c='a';// 1st value
System.out.println("x.c="+x.c);
// ref by funz
funz(x);//x will be transfer to funz DIRECTLY
System.out.println("x.c="+x.c);
}
}
output:
x.c=a
x.c=z