A list of variable names and tells whether each is legal or illegal in Java.

posted Jan 19, 2014, 11:48 PM by iman baqir   [ updated Jan 20, 2014, 12:12 AM by Karwan Jacksi ]

Variable Name              Legal or Illegalr

dayOfWeek                    legal

 3dGraph                        Illegal because identifiers cannot begin with a digit

 junel997                         legal

 mixture#3                      Illegal because identifiers may use only alphabetic

                                      letters, digits, underscores, or dollar signs

 week day                       Illegal because identifiers cannot contain spaces