I saw this in my textbook and was wondering what it was and when to know to use it.
public class TV{
public static final int MAX.VOLUME = 10;
public static final int DEFAULT.CHANNEL = 2;
public static final int DEFAULT.VOLUME = 4;
In java, there are certain rules when defining a variable name.
A variable name must not ,
The first character of a variable name,
az|AZ
) $
) _
) 0-9
) The rest of the name can contain any combination from the following,
az|AZ
) $
) _
) 0-9
) All variable names are case-sensitive .
So using a period ( .
) in the middle of an variable name will result in a compile error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.