May this question is repeated but I tried most of the solution but none of them fit in my problem. Referring to this page : https://docs.oracle.com/javase/tutorial/uiswing/components/table.html
I want to create the JTable to read from objects from my custom class.As an initial step, I want to test the looping with the JTable. As follow:
Object[][] tripsData =new Object[3][6];
for(int j=0; j< 3;j++)
for(int i =0; i< 6;i++)
{ tripsData[j][i]= new Object[] {"Kathy", "Smith","wait", "Snowboarding", 5, "false"};
}
The code works fine except the output it shows like this:
[Ljava.lang.Object;@41488024
[Ljava.lang.Object;@54c83ae1
[Ljava.lang.Object;@161a4f2c
I tried to use, toString() and valueOf(), but the same thing. Any suggestion to solve
[Ljava.lang.Object;@41488024is thetoStringmethod ofObject[]tripsDataan array? It is a single element in the matrix!