⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mihtml.java

📁 Java的面向对象编程 掌握类的定义以及继承机制
💻 JAVA
字号:
import java.io.*;
public class MiHtml
{
   public static void main(String[] args)throws IOException
    {
       String fileName="D:/MiHtml.html";
       Mi m=new Mi();
     
   try
    {
      BufferedWriter out=new BufferedWriter(new FileWriter(fileName));
      out.write("<html>");
      out.newLine();
      out.write("<head>");
      out.newLine();
      out.write("<title>2的幂次</title>");
      out.newLine();
      out.write("</head>");
      out.newLine();
      out.write("<body>");
      out.write("<table border=1 align=left >");
      out.newLine();
      out.write("<tr align=center valign=middle>");
      out.newLine();
      out.write("<th>Power of 2</th><th>value</th>");
      out.newLine();
      out.write("</tr>");
      out.newLine();
      for(int i=0;i<10;i++)
     {
       int t=m.miFun(i);
       out.write("<tr>");
       out.write("<td>"+i+"</td>");
       out.write("<td>"+t+"</td>");
       out.newLine();
     }
      out.write("</body>");
      out.newLine();
      out.write("</html>");
      out.newLine();
      out.close();
    }
   catch(IOException iox)
    { System.out.println("Problem writing"+fileName);}
  }   

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -