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 the wrong this code?

  1. #1
    Junior Member
    Join Date
    Sep 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what's the wrong this code?

    public class StringLenght
    {
    public static void main(String args[])
    {
    String name= "ThilinaSandaruwan";
    System.out.println(name.lenght());
    }
    }

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: what's the wrong this code?

    Why do you think there is anything wrong with the code?
    If you get an error message, please copy the full text and paste it here.

    Please edit your post and wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. What's wrong in this code?
    By Mumpy Zinu in forum What's Wrong With My Code?
    Replies: 6
    Last Post: June 13th, 2014, 05:43 AM
  2. What's wrong with my code?
    By SecTech in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 23rd, 2013, 07:38 PM
  3. WHAT IS WRONG WITH MY CODE
    By YG N JYP FAM4EVA in forum Object Oriented Programming
    Replies: 1
    Last Post: February 26th, 2013, 05:14 PM
  4. What is wrong with my code?
    By docthoi in forum Java Theory & Questions
    Replies: 13
    Last Post: February 3rd, 2013, 05:33 PM
  5. what is wrong with my code? please help
    By black.angel in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 13th, 2012, 02:34 PM