illegal start of expression

Hello,

sorry for my sloppy English, but I'm from Holland :p

This program is returning 2 errors when I compile it in Jbuilder :

package h11opdracht2;

// Bert-Jan Diedering

// test jezelf opdracht nummero 2 van hoofdstuk 11

// gemaakt : maandag 24 maart 2003

import java.awt.*;

import java.awt.event.*;

import java.applet.*;

public class ArrayRijKolSom extends Applet

{

//static final int rijNr = 0;

//static final int kolNr = 0;

private int tabel[][]={{3,6,9},

{4,2,5},

{1,3,3},

{4,5,2}};

private int somRij[];

private int somKol[];

public void paint (Graphics g)

{

int xPos,yPos;

sommeerTabel();

xPos = 25;

yPos = 25;

g.drawString("Som van rijen:",xPos,yPos);

yPos+=15;

for(int i=0;i<somRij.length; i++)

{

g.drawString(""+somRij,xPos,yPos);

xPos+=20;

}

xPos = 25;

yPos += 25;

g.drawString("Som van kolommen:",xPos,yPos);

yPos += 15;

for(int i=0;i<somKol.length; i++)

{

g.drawString(""+somKol,xPos,yPos);

xPos += 20;

}

}

public void sommeerTabel()

{

//eerst kolommen totaal berekenen

int[] somKol = new int[tabel.length];

for(int kolNr=0;kolNr<somKol.length; kolNr++)

somKol[kolNr]=bepaalSomVanKolNr(int tabel[][], int kolNr);

//en dan de rijen totaal berekenen

int[] somRij = new int[tabel.length];

for(int rijNr=0; rijNr><somRij.length; rijNr++)

somRij[rijNr]=bepaalSomVanRijNr(int tabel[][], int rijNr);

}

public int bepaalSomVanRijNr(int dinges[][], int rijNr)

{

int som=0;

int kol;

for(kol=0; kol><dinges[rijNr].length; kol++)

dinges[rijNr][kol]=kol;

return kol;

}

public int bepaalSomVanKolNr(int dinges[][], int kolNr)

{

int som=0;

int rij;

for(rij=0; rij><dinges[kolNr].length; rij++)

dinges[rij][kolNr]=rij;

return rij;

}

}

It says :

"ArrayRijKolSom.java": Error #: 203 : illegal start of type at line 54, column 39

"ArrayRijKolSom.java": Error #: 203 : illegal start of type at line 59, column 39

What can I do about it?>

[2347 byte] By [brutus1234a] at [2007-9-28 16:17:58]
# 1
ow sorry, the topic name should be : illegal start of type...can some moderator change this, please?thanx...
brutus1234a at 2007-7-12 13:25:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
sorry I made a mistake... somKol[kolNr] = bepaalSomVanKolNr(int tabel[][],int kolNr); should be :somKol[kolNr] = bepaalSomVanKolNr(tabel,kolNr);but now I have an ArrayIndexOutOfBoundsExeption...can somebody please help me with this? thanx you!
brutus1234a at 2007-7-12 13:25:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
Your array "table" is two-dimensional 4 by 3, but you always pass 4 to your sub-functions (table.length). So you try to access index [4][4] in the line:dinges[rij][kolNr]=rij;
jolsea at 2007-7-12 13:25:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4
thank you verry much! the program is now finished, working correctly and I got a good mark from my teacher!thanks everybody!
brutus1234a at 2007-7-12 13:25:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...