Class matrix
hi
i'm new on java en all that stuff
and i'm trying to write matrix class with several methods
i'm no sure but i think i'll have to start like this :
public class matrix{
private double t[ ][ ]=new double [ x ][ y ];
public int x,y;
public matrix(){
but i don' know how to continue
[343 byte] By [
leboucana] at [2007-10-3 7:49:33]

This is not an algorithm question.
It should be in new to Java section since you are new to java.
How to continue? Well first and foremost, before you even start writing a class you should have some idea what the class should do. What should your matrix class do? Why even build one since anyone could write
double[][] matrix = new double[10][13];
and build themselves a nice 10 by 13 matrix of doubles.
You don't do me (or yourself) any favors by wrapping something that I can do directly into a class, unless of course your calss does something.
So the answer to your question is what do you think you should be able to do with a matrix? Make copies of it? I supose you could do that. Multiply them together, well, that requires that they be compatible, you could check that and do it.
What you do next is decide what you want this class to do then write code to do those things. Furthermore, I might suggest that this is where you actually start. First you write the code that you want to write and from that the class structure is whatever it needs to be to support the code that you want to write.
Now, the other thing you should know is that your start on this class is wrong as well.
First of all you did not follow naming conventions Classes start with capital letters. What you did is legal but it is a bad practice and basically wrong.
the line that begins: private double t[][] uses values x and y which have not been defined yet. So line 2 is wrong.
You should be building a constructor where you pass in values x and y and then you use those to execute the line new double[x][y] so that it actually creates a matrix of a proper size. However the constructor that you started beginning with: public matrix(){ has no arguments. This is legal but probably wrong because you don't specify what size the matrix should be.
Also the names x and y are poor choices for names for the number of rows and the number of columns. If you really want to use x and y, at least they should be something like maximumX or maxX or xSize or something that indicates that they are the limits on the size of the defined matrix. The names are legal, but you are already 0 for 3 so lets just declare them to be wrong also.
So in 4 lines of code starting your class you have 4 of them wrong.
I don't want to tell you that you shouldn't start on matrix code, because after all you have to start somewhere, but generally when one wants to learn a computer language you find a tutorial or a book and work your way through the ALL the examples before you haul off and try to write your own stuff. Otherwise you quickly come to a point where you don't know what to do next.
Baby steps.