Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Declaring paramters in java class

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Declaring paramters in java class

    Hello,

    I am trying to declare fields as protected String custom.field.1096; in my java class but it does not allow me.
    Can I not declare the field as above? Is there any workaround to achieve this?

    Thanks


  2. #2
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: Declaring paramters in java class

    you cannot declare a field name with invalid characters. dot ( . ) is not a valid character for declaring a field name.
    kindly see this: Variables (The Java™ Tutorials > Learning the Java Language > Language Basics)

Similar Threads

  1. Replies: 2
    Last Post: April 8th, 2014, 12:05 PM
  2. What is the difference in declaring class variables?
    By Robertgif in forum Java Theory & Questions
    Replies: 3
    Last Post: September 18th, 2013, 12:52 AM
  3. having problem declaring a generic type array in OrderSet class
    By mia_tech in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 10th, 2012, 06:39 PM
  4. [SOLVED] Properly declaring constants in Java
    By ChristopherLowe in forum Java Theory & Questions
    Replies: 2
    Last Post: March 19th, 2012, 03:21 PM
  5. <..> when declaring a class
    By Asido in forum Java Theory & Questions
    Replies: 1
    Last Post: September 8th, 2010, 08:47 AM