Help with Java code
Firstly, I'm new to Java and have very little experience - so apologies if this seems rather basic. I'm trying to write a programme in BlueJ that will allow me to output a table of multiplication values, the parameters of which can be entered when the method is called. Below is a (rather poor) example of what I mean.
1 2 ... 10
1 1 2 ... 10
2 2 4 ... 20
5 5 10 50
It's important that the table lines up correctly, which unfortunately these forums won't allow me to illustrate (the top line of numbers should be one space to the right).
I'm trying to teach myself Java from a book called 'Objects First with Java' with a few supplementary tuition lessons from a friend of a friend, but am finding it extremely difficult.
So far, this is the code I've written:
"public class MultiplyTables
private int accross;
private int down;
public void maketable(int accrossx, int downy)
int across = 1;
int down = 1;
while (accross <= 12)
I think I need to use if/else statements but am having real trouble grasping all these different types of statement. Could anyone give me a hand with this?
Many thanks for any help.