Hello,
I am taking Java fundamental course and I've came up with a confused character i.e # on assigning variable name on Java lately. I have surfed the internet a lot but all I could find is only oprerators, keyword and reserved words are not allowed. so why is # not allowable on variable name in Java. Example - total # is not allowed as a variable name.
Thanks in advance.
JacobAbrham
0
Newbie Poster
Recommended Answers
Jump to PostSimply follow my second link (also first link works) to find the information you are seeking for. Letter # is indirectly excluded from to be legal for identifiers in both methods isJavaIdentifierStart(int) and isJavaIdentifierPart(int) of Character class. There you can find the exact rules which letters are allowed for constructing …
Jump to PostThere is documentation on it if you use the symbol as intended with an @see in JAVADOC
All 7 Replies
1stDAN
JacobAbrham
0
Newbie Poster
Banderson
29
Junior Poster in Training
1stDAN
JacobAbrham
0
Newbie Poster
1stDAN
Banderson
29
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.