import java.util.*; import java.applet.*; import java.awt.*; public class powertest extends Applet { double result1, result2, result3, result4; Image holdImage; Graphics holdGraphics; public void init() { holdImage = createImage(size().width, size().height); holdGraphics = holdImage.getGraphics(); result1 = 5.0; result2 = Math.pow(2.0,5.0); result3 = Math.pow(2.0,10.0) + 1 - Math.pow(2.0,10.0); result4 = Math.pow(2.0,100.0) + 1 - Math.pow(2.0,100.0); repaint(); } public void start() { repaint(); } public void run() { repaint(); } public void stop() { } public void paint(Graphics g) { g.drawRect(0,0, size().width - 1, size().height - 1); g.drawString("Hello from Java!", 30, 30); g.drawString("" + result1, 30, 60); g.drawString("" + result2, 30, 90); g.drawString("" + result3, 30, 120); g.drawString("" + result4, 30, 150); } }