I have to write a program that creates a text file that contains a power of two table in HTML format. Also the instruction are

The file should start with something like:

<html><head>
<title>Powers of Two</title>
</head>
<body>
<table border cellpadding=5>
<tr><th>Power of 2</th><th>Value</th></tr>

Each line of the table looks like:

<tr><td>0</td><td>1</td></tr>

And end with:
</table>
</body></html>

good luck.

can someone help me with it..because i don't know how to do it!

Do you understand how to work with file streams? Do you understand how to implement a pow method? Either your own or the existing one?

do you know what programming is?

well, i don't know much about java, i am a beginner

so start learning. Just dumping your homework on forums and waiting for others to do it for you isn't going to make you learn anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.