import java.applet.Applet;  // java applet sinifini cagir
import java.awt.*;          // java pencere kullanma sinifini cagir

public class metodornegi2 extends Applet implements ActionListener
{
   double sayi=5;           // Gercek degisken sayi

   // sayinin karesi dinamik metodu
    public double kare(double x)
    {
    return x*x;
    }

    public void paint(Graphics g) 
    {
    g.drawString(sayi+"nin karesi =  "+kare(sayi),25,50);
    }
}
