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 4 of 4

Thread: string data initialize java telling illegal.... please tell me right way ??

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    15
    My Mood
    Confused
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default string data initialize java telling illegal.... please tell me right way ??

    String clumnName[]={"column1","column2","column3"};
    String dataValues[]=
    {
    {"12", "16", "17"},
    {"4", "2", "1"},
    {"9", "7", "8"},
    {"99", "77", "88"},
    };


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: string data initialize java telling illegal.... please tell me right way ??

    The second one is a 2D array.
    Follow my signature link.

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    15
    My Mood
    Confused
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: string data initialize java telling illegal.... please tell me right way ??

    give me idea how to correct initialize correct format

  4. #4
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: string data initialize java telling illegal.... please tell me right way ??

    Declare it as a 2d array.

Similar Threads

  1. Telling the user they left their input blank **GUI**
    By Grot in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 17th, 2013, 05:36 PM
  2. Var Might have been initialize
    By Evilreaper in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 15th, 2012, 10:27 AM
  3. Help, I have no idea what my console is telling me. :(
    By Zack22 in forum Java Theory & Questions
    Replies: 3
    Last Post: November 18th, 2011, 08:48 AM
  4. Retrived data is showing null string
    By uhertz in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 6th, 2011, 03:04 AM
  5. I'm not sure how to initialize GraphicsDevice and Window
    By DotChris in forum AWT / Java Swing
    Replies: 3
    Last Post: July 15th, 2009, 09:00 AM