compiler-design-eth/javali_tests/HW4_nop90/method invocation/OkMethod.javali

20 lines
194 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
// call a simple method and use its return value
class Main {
void main() {
int a,b;
C c;
c = new C();
a = 5;
b = c.aux(a);
}
}
class C{
int aux(int arg){
return arg*2;
}
}