+ 1

Why can't we use #,@ in variable names?

*, +, -, &, ^, . can't be used because they are used in java as operators or separators. But what about these characters?

11th Feb 2017, 4:07 AM
Kommoju Sunil Kumar
Kommoju Sunil Kumar - avatar
2 Answers
+ 2
There is certain rules to use variable name... 1.variable name must be a letter, underscore, dollor. 2.number are not allowed as the first character. 3.must not include mathematical and logical operators. 4.must not contain spaces.
11th Feb 2017, 4:20 AM
Chandan Kumar Y S
Chandan Kumar Y S - avatar
0
we can just use $
19th Feb 2017, 7:30 PM
Hayat GĂŒnce Gemalmaz