why is int e# an incorrect variable name?

Posted on 2011-04-29
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
    LVL 86

    Expert Comment

    You can test any non-start character with

    Open in new window


    Author Comment

    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

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

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Title # Comments Views Activity
    what is spring 3 35
    count7 challenge 12 52
    What is JNDI datasource in spring 1 18
    groovy example issue 10 31
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now