• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why int e# is illegal identifier?

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why int e# is illegal identifier?
 
Ranch Hand
Posts: 529
19
Eclipse IDE MySQL Database Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
# is not allowed to use while naming a variable.

Rules for naming a variable:
  • Variable names mustn't be keyword or reserved word
  • Variable names are case-sensitive
  • A variable's name can have an unlimited-length sequence of Unicode letters and digits
  • Recommended to begin variable name with a letter then can have the dollar sign "$", or the underscore character "_" but better avoid using $ and _
  • Example: float interest_Rate; or interest$Rate but recommended int interestRate;
  • White space is not permitted.
  • Use full words for variable names like above example so anyone can understand what that variable is for
  • Don't use abbreviations like int c, a, b
  • If variable name has on word then write in small letter Example int age; else first word in small and subsequent in capital Example gearRatio and currentGear
  • If your variable stores a constant value then all letters in capital. If has two words in it then separate two words by underscore Example static final int NUM_GEARS = 6
  •  
    Vishal Kurkure
    Greenhorn
    Posts: 19
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thank you,
     
    Ganish Patil
    Ranch Hand
    Posts: 529
    19
    Eclipse IDE MySQL Database Tomcat Server Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    You're most welcome
     
    Slime does not pay. Always keep your tiny ad dry.
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic