Java Programming Joyce Farrell, 8th editon exercise 10 pg 486, I need help creat
ID: 3866085 • Letter: J
Question
Java Programming Joyce Farrell, 8th editon exercise 10 pg 486, I need help creating a Gui for the program it works but error keeps getting thrown, Here is my code, and Output, I need to stop the execption error from appearing:
static int bonus[][] = {{5, 9, 16, 22, 44},
{10, 12, 18, 25, 36},
{20, 25, 32, 42, 53},
{32, 38, 45, 55, 68},
{46, 54, 65, 77, 90},
{60, 72, 84, 96, 120},
{85, 100, 120, 140, 175}};
static int weeks = 6;
static int reviews = 4;
Explanation / Answer
static int weeks = 6;
static int reviews = 4;
You declared as static and you are reassigning the value as
weeks = Integer.parseInt(weeksWorked.getText());
reviews = Integer.parseInt(weeksWorked.getText());
Static is meant for not reassigning the value but we can do increment and decrement of value
try removing static for weeks and reviews and remove static for bonus array as well.
If you face issues further, just paste the full code, so that I can solve your bug.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.