Do we call static void final because its a constant.
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.
Thanks
Yes public static final int and then the name of your constant in all uppercase, and it goes before your main method!
Yes public static final int and then name of your constant in all uppercase, and it goes before your main method!