how to access private vairable in java method

Solutions on MaxInterview for how to access private vairable in java method by the best coders in the world

showing results for - "how to access private vairable in java method"
Brayan
10 May 2019
1public Class A{
2
3   private String myData;
4
5   public String getMyData(){
6        return myData;
7   }
8
9   public void setMyData(String data){
10        this.myData=data;
11   }
12}