📄 mihtml.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 + -