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: what's wrong with this code?

  1. #1
    Junior Member
    Join Date
    Oct 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what's wrong with this code?

    String s[] ={'a','b','c','
    static char chard','e','f','g','j','k','l','m','n','o','p','q' ,'s','t','u','v','w','x','y','z'};

  2. #2
    Member
    Join Date
    Apr 2014
    Posts
    92
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default Re: what's wrong with this code?

    Hi,

    First, do you know the basics of arrays? I'd suggest referring back to a beginner's guide on arrays and getting a refresher.

    Second, basic pattern recognition skills are essential for programming, and a simple application of those skills in this case would immediately reveal that the term "static char chard" doesn't fit with everything else between the curly braces. So that would be a pretty good place to start.

    Lastly, you might want have a look at this guide, and I hope you find it useful.

Similar Threads

  1. Not sure what is wrong with my code.
    By Deeyz in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 2nd, 2014, 05:10 AM
  2. Not sure what is wrong with my code.
    By Deeyz in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 1st, 2014, 08:59 PM
  3. What's wrong with my code?
    By techflyer in forum What's Wrong With My Code?
    Replies: 0
    Last Post: June 13th, 2013, 02:54 PM
  4. can someone tell me what's wrong with my code
    By Nate08 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: February 23rd, 2012, 05:07 PM
  5. What is the wrong with this code?
    By Subhasri in forum AWT / Java Swing
    Replies: 1
    Last Post: September 29th, 2011, 08:14 AM