答案-事件驱动编程期中试卷.docVIP

  • 9
  • 0
  • 约3.47千字
  • 约 4页
  • 2017-09-25 发布于江西
  • 举报
Write two Java codes to show the simple string “Hello World” on the screen in Java Application and Java Applet. ////////////////////////////////////////////////////////////////////////////////////////////////////// public class HelloWorld   {    public static void main(String args[])   {    System.out.println(Hello,World!);   }  }import javax.swing.JApplet; import java.awt.Graphics; public class HelloWorld extends JApplet { String s; public void init() { s = Hello World!; } public void paint(Graphics g){ g.drawString(s,25,25); } } 2 Draw the cillogram of f

文档评论(0)

1亿VIP精品文档

相关文档