Skip to content

Instantly share code, notes, and snippets.

@thetekst
Created February 21, 2011 20:32
Show Gist options
  • Save thetekst/837665 to your computer and use it in GitHub Desktop.
Save thetekst/837665 to your computer and use it in GitHub Desktop.
square
public class MyClass {
private double width;
private double height;
void setValues(double width, double height){
this.width = width;
this.height = height;
}
double getSq(){
return width * height;
}
public static void main(String[] args) {
MyClass peremennaya = new MyClass();
peremennaya.setValues(5,2);
System.out.println(peremennaya.getSq());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment