Java While Loop Through An Array Python Definition Instance