summaryrefslogtreecommitdiff
path: root/base/ex37.java
blob: 867116af10263fa0414ed63dfde556f25217ea74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class ex37 {
    public static void main(String[] z) {
        A a ;
        a = new A() ;
        System.out.println(a.foo()) ;
    }
}

class A {

    public int foo() {
        int v ;
        v = 0 ;
        while (v < 10) {
            v = v + 1 ;
        }
        return v ;
    }

}