So, I made this small snippet, but can't get to to work on Java
# return true if a list is made of lists and integers only, it's recursive
def checkIfValid(obj):
for i in obj:
if type(i) == list:
return checkIfValid(i)
elif type(i) == int :
pass
else: return False
return True
a = [1, 2, 3, [1,2, 3, [2, 2, "a"]]]
b = [1, 2, 3, [1,2, 3, [2, 2, []]]]
if (checkIfValid(a)): print("a")
if (checkIfValid(b)): print("b")
