public class StaticFns {
  // remove 'static' below, see what compilation error you get
  public static int squared(int x) {
    // just for exercise, we do this three different ways :)

    int sq1 = x*x;
    int sq2 = (int)Math.pow(x,2);
    int sq3 = power(x,2); // our own eqvt of Math.pow()

    return (sq1+sq2+sq3)/3; // because sq1,sq2,sq3 should all be identical
  }// squared()

  // our own version of Math.pow()
  public static int power(int a, int b) { // a raised to b
    int result=1;
    for(int i=1;i<=b;i++) {
      result *= a;
    }
    return result;
  }// power

  public static void main(String args[]){
    int x = 25;
    int y = squared(x); // static main() calls static squared()
    // note that we could have said, above: StaticFns.squared(x); 
    System.out.println(y);
  }// main
}// StaticFns