Java While Loop Through An Array Python Methods And Classes