Skip to content

Instantly share code, notes, and snippets.

@thetekst
Created February 21, 2011 18:22
Show Gist options
  • Save thetekst/837469 to your computer and use it in GitHub Desktop.
Save thetekst/837469 to your computer and use it in GitHub Desktop.
MyClass
public class MyClass {
private int myClassPropeties;
void setMyClassPropeties(int number){ //или void setMyClassPropeties(int myClassPropeties){
myClassPropeties = number; //тогда здесь this.myClassPropeties = myClassPropeties;
}
int getMyClassPropeties(){
return myClassPropeties;
}
public static void main(String[] args) {
MyClass peremennaya = new MyClass();
peremennaya.setMyClassPropeties(5);
System.out.println("Результат " + peremennaya.getMyClassPropeties());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment