import java.awt.*; import java.applet.*; /*Short program that computes the length of the hypotenuse of a right triangle given the lengths of its two opposite sides. */ // //Demonstrate dynamic initialization. public class DynInit extends Applet{ public void paint(Graphics g) { double a = 3.0, b = 4.0; //c is dynamically initialized. double c = Math.sqrt( a * a + b * b); g.drawString("Hypotenuse is: " + c ,20,20); } } //The output is Hypotenuse : 5