Is this right??? @@@@@@ Answer ASAP?
Question: Is this right??? @@@@@@ Answer ASAP?
I’m doing Java programming for my Computer Science class using the “Ready to Program Java” software (Google it if you don’t know what it is) and I just wanted to know if I did this problem right…
Here’s the question:
Create an applet that displays your first name in every even number font size from 4 through 25.
Here’s how I programmed it:
public void paint (Graphics g)
{
int x = 0;
int z = 0;
for (int y = x + 2 ; y <= 25 ; y++)
{
Font font = new Font ("TimesRoman", Font.PLAIN, y);
z = z + 20;
g.setFont (font);
g.drawString ("My Name", z, z);
}
***Note: I just copy and pasted the code from my program, and I did not include all of it (Like brace brackets etc.)
I just want to know how to code it, I know everything else.
Thanks, I need the answer ASAP please.
Answer:
Answer by Jesus Christ
gl
