O
O
Orkhan Hasanli2018-07-04 13:29:03
Java
Orkhan Hasanli, 2018-07-04 13:29:03

How can a table be implemented in java for further operations?

Good day!
I am creating a small application in android and to get the test result, you need to pull data from the table (not to be confused with the database). Question - what is the best way to represent this table in java? Image of the table below - I was
17911c55-520f-44f3-8d3c-7e3eaedc53e2.png
thinking of creating a two-dimensional array, but since the values ​​of the first column are also important, I decided that after the double array, I should use if ... else to compare the day and month and display the corresponding result. Is there an easy way to implement a table like this?
Thanks in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexover, 2018-07-05
@azerphoenix

Create a class like

public class MyData {
private Date start;
private Date end;
private boolean odd;
private boolean even;
//геттеры, сеттеры
}

and then use List<MyData>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question