Created
February 21, 2011 18:22
-
-
Save thetekst/837469 to your computer and use it in GitHub Desktop.
MyClass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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