Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+20 votes

Do we call static void final because its a constant.

asked in CSC211_Winter2018 by (1 point)

3 Answers

+11 votes

Yes, you should put constants within the class but outside of the main method. However, do not include the “void” part.

For example, if you wanted to declare an integer named SIZE it would be:

public static final int SIZE = 3;

Hope this helps.

answered by (1 point)
+2

Thanks

+2 votes

Yes public static final int and then the name of your constant in all uppercase, and it goes before your main method!

answered by (-499 points)
+2 votes

Yes public static final int and then name of your constant in all uppercase, and it goes before your main method!

answered by (-499 points)
...