I have array list like this

```
ArrayList list = new ArrayList();
list.add("somethingold");
list.add(3);
list.add("somethingnew");
list.add(5);

```

Now if I print the list output will be like:

```
[somethingold, 3, somethingnew, 5 ]

```

Here i want to fetch only integer elements.

I want the output like, if it is an integer put it in some other list, else in one more list.

This is what i want:

```
[3,5]
[somethingold, somethingnew]

```