why can write private variable keyword to main method code example
Example: how to access private vairable in java method
public Class A{
private String myData;
public String getMyData(){
return myData;
}
public void setMyData(String data){
this.myData=data;
}
}