Components of Java Technology


  • Language elements
    • Class-based OOPL with inheritance
    • A class is a template that defines how an object will look and behave once instantiated

  • Sample Java Code

    public class Point {
          private float x_;
          private float y_;
    
          public Point (float xval,
                   float yval)
              { x_=xval; y_=yval; }
    
          public float distanceFrom
                      (Point refpt)
                      {
          ...
       }
    }