Java Code Conventions: must match pattern '^[a-z][a-zA-Z0-9]*$'
^[a-z][a-zA-Z0-9]*$
This regex describes something which starts with lowercase and the remainder is composed of uppercase, lowercase, and numbers. (Examples: aVariable
, variable
, aNewVariable
, variable7
, aNewVariable7
.)
If you want your field to be constant and static, use:
static final String ADD = "Add text";
Otherwise, use:
final String add = "Add text";
If it is a constant you want, it should also be static
static final String ADD = "Add text";
Constants normally use uppercase letters, but since your variable was not static, it was not interpreted as a constant.