Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 11-08-2006, 01:18 PM   #1
Solid State Member
Join Date: Mar 2006
Posts: 19
Default Help with Java code

Hi there,

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.
Airwalker is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 11:31 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0