import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Parent{
    private int value=10;
    public void setValue(int value){
        this.value=value;
    }
   public int getValue(){
       return value;
   }
}
class Main {
    public static void main(String[] args) {
         Parent p=new Parent();
        int res=p.getValue();
        System.out.println(res);
         p.setValue(100);
        res=p.getValue();
        System.out.println(res);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: