I have written a program which gives me three arrays.A string array and two dole arrays.... But I want to save them in one thing(I don\'t know if it would be an array or matrix)
class Triple {
private String name;
private double d1;
private double d2;
public Triple(String name, double d1, double d2) {
this.name = name;
this.d1 = d1;
this.d2 = d2;
}
}
Then you can do
Triple[] fruits = new Triple[3];
fruits[0] = new Triple("Apple", 42.0, 13.37);
I really suggest you to read a good tutorial on Object Oriented Programming, like my favorite, especially Chapter 25+.