Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.
I mean step through your code: pretend you're the JVM. You must have a basic idea of how you want the code to work--does the code you wrote match up with that expectation?
Hint: no, but it'll crash before it even gets that far since you're trying to store values into a null array reference.