Preview:
class A
{
    private int value;
    
    public void setValue(int x)
    {
        value=x;
    }
    public int getValue()
    {
        return value;
    }
}
class D
{
    public static void main(String[] args){
    A r= new A();
    r.setValue(500);
    System.out.println(r.getValue());
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter