Untitled

mail@pastecode.io avatar
unknown
plain_text
14 days ago
304 B
1
Indexable
Never
import java.util.*;

class A {
    int x;
    protected int y;

    void cal(int a, int b) {
        x = a + 1;
        y = b;
    }
}

public class Begin {
    public static void main(String[] aa) {
        A obj = new A();
        obj.cal(2, 3);
        System.out.println(obj.x + " " + obj.y);
    }
}
Leave a Comment