So, im making a program in which whenever a button is clicked 3 is added to an integer called Score so that if the button is clicked 2 times score will be 6.I made the score int final int with value of 0.
Ok the syntax i added was
- To add 3:
Viewablescore[0] =+ 3;
- For console
System.out.println(Viewablescore);
- for JFrame
label2.setText(String.valueOf(Viewablescore));
I wanted to print the result on both console and in the Jframe, but i was given with [I@563bf420
.
The program ran successfully.
What should i do