Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jxam Quation

 
Hima Nadi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
leagal anmes for variables
1)-int
2)%large
3)$fred
4)Integer
5)2much
my ans is 1,3
is 4 also leagel
any help?
 
Joshua Kueck
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just try it and see
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hima Nadi:
leagal anmes for variables
1)-int
2)%large
3)$fred
4)Integer
5)2much
my ans is 1,3
is 4 also leagel
any help?

Your answer is incorrect.
3 and 4 are the correct answers. Variables may start with _ $ or alpha. Numerics may appear later in the variable name.
Integer is a correct variable name as it is not a reserved word.
What study text are you using? All this should be covered there. . .
 
Hima Nadi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to trouble you Jim,
Somehow I got a wrong impression that Integer, Character.. Are should not be used as variable names.
Now I am clear.
Thanks for help
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they probably "should" not be used -- 'cause it could cause the programmer to be confused while writing the code... but that doesn't mean that they "could" not be used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic