Results 1 to 4 of 4
  1. #1
    soccermiles is offline Member
    Join Date
    Apr 2010
    Posts
    19
    Rep Power
    0

    Unhappy Help! Wierd glitch invalidated int[].length method!

    I was working on a decoding thing with netbeans, and when I tried to use the .length() method for an int[] array, it gave the message "javadoc not found", and then "Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager."

    can any1 help me fix this problem? It is now impossible for me to use the .length() method on ANY of my programs.

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by soccermiles View Post
    I was working on a decoding thing with netbeans, and when I tried to use the .length() method for an int[] array, it gave the message "javadoc not found", and then "Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager."

    can any1 help me fix this problem? It is now impossible for me to use the .length() method on ANY of my programs.

    to get the length of your array use the field length and not the method length(), so arr.length will work.

  3. #3
    soccermiles is offline Member
    Join Date
    Apr 2010
    Posts
    19
    Rep Power
    0

    Default

    ok, cool. it's wierd though. you know how in netbeans when you put in the "." to invoke a method it makes a menu with all of the methods associated with that object? well, this time it wouldn't give me the description of .length, only the message I mentioned earlier.
    Last edited by soccermiles; 04-18-2010 at 08:13 PM. Reason: never mind....

  4. #4
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by soccermiles View Post
    what? do you mean that just saying...

    int[] blah={1,2,3,4,5}
    system.out.println(blah.length)

    will work?

    yes, if it wouldn't contains errors (missing semicolons and system instead of System). use this one

    int[] blah = { 1, 2, 3, 4, 5 };
    System.out.println(blah.length);

Similar Threads

  1. How can I implement the String's length() method?
    By kiregad in forum New To Java
    Replies: 6
    Last Post: 03-26-2010, 07:06 AM
  2. Button Glitch
    By dunafrothint in forum AWT / Swing
    Replies: 4
    Last Post: 02-16-2010, 05:06 PM
  3. wierd problem
    By f_the_cook in forum Advanced Java
    Replies: 4
    Last Post: 10-09-2008, 06:13 PM
  4. what does num.length method does?
    By kris09 in forum New To Java
    Replies: 1
    Last Post: 08-07-2008, 11:19 PM
  5. Help with method length
    By toby in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •