Advertisement
riking

Example

Mar 12th, 2011
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. class MyClass {
  2.     public int a;
  3.     public int b;
  4.  
  5.     public int myFunction(int param) {
  6.         return a*a+b*b+param;
  7.     }
  8.     public MyClass(int a, int b) {//constructor: no return type
  9.         this.a=a;
  10.         this.b=b;
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement