This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Im using Netbeans to create a program/project for school that takes user input from two text fields, stores it in an array. I have created the GUI and Array but get errors when defining the on-enter event.
Here is the array definition:
And here is the textfield retrieval:
Looking forward to learning more. Thanks for any help.
I think this coding style is ill-advised. Why embed the incrementing of a variable -- a significant event by any standard -- within an array access instruction? Your intent is not entirely clear. Can you tell me the value of i when the array access occurs?
When incrementing a variable, do so in an instruction that contains nothing else but incrementing the variable, unless there is a compelling and immediately comprehensible reason to do otherwise.