class X { | |
def foo ( ){ | |
def a = 5 | |
def b = 7; | |
def c = 2; | |
<begin>c=a+c<end> | |
print b | |
print c | |
} | |
} | |
----- | |
class X { | |
def foo ( ){ | |
def a = 5 | |
def b = 7; | |
def c = 2; | |
c = testMethod(a, c) | |
print b | |
print c | |
} | |
private int testMethod(int a, int c) { | |
c = a + c | |
return c | |
} | |
} |