How to add element in static list of type object.
I have List of Object like this.
List<Object[]> myList = new ArrayList<>();
How can I add static element in that ?
Suppose my element is like
[{
name : "David",
roll : "1234",
class : 5
}]
What I am trying is
static List<Object[]> myList = new ArrayList<>();
myList.add([{
name : "David",
roll : "1234",
class : 5
}])
but this is failing.