Untitled

Anonymous
plain_text
06/05/2024 5:45 AM
408 B
14
Indexable
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);
    }
}
Editor is loading...
Leave a Comment