I know that A method is referentially transparent if its return value (with identical actual parameters) is independent of the program context.
e.g. this code is not transparent.
public static int Erna () {
return y;
}
but can someone please give an example of java code which is transparent so I can understand this better?