1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
public class Invoke_2 { static int s; public static void foo (int a, int b) { System.out.println(a + " " + b); } public static void main(String[] args) { foo (bar(), s); } public static int bar() { s = 33; return 99; } }