[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


why is int e# an incorrect variable name?

Posted on 2011-04-29
Medium Priority
Last Modified: 2012-05-11
Why is int e# an incorrect variable name? if in the end is a letter followed by a character that well could be a connector character, i mean ,  is not a plus or a minus.
Question by:bachstein
  • 2
LVL 86

Expert Comment

ID: 35490930
You can test any non-start character with

Open in new window


Author Comment

ID: 35490962
Thanks CEHJ, but in  a certification test scenario , my guess would have been, yes it is valid. It turns out is not,  why?. I just have to learn it the way it is?
LVL 86

Expert Comment

ID: 35491051
iirc only numbers, letters and underscores. The first of these can't start an identifier
LVL 92

Accepted Solution

objects earned 200 total points
ID: 35495034
simply because # is not a valid characterer to include in an identifier as defined by the jls
you'll find the definition of an identifier here

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question