|
Is it possible to get the length of a Char Array: Here is my code: char[] letters = current.toCharArray(); for (int count2 = 0; count2<letters.lenght; count2++) and here is the error: Wheel.java:33: Attempt to reference field lenght in a char[]. for (int count2 = 0; count2<letters.lenght; count2++) { ^ It looks like you can only get the lenght of an INT but not from a CHAR. Am I right about this or not? Maarten _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Reporting-MTA: dns; linux.midrange.com Arrival-Date: Wed, 14 Feb 2001 05:55:07 -0600 Final-Recipient: rfc822; java-l@midrange.com Action: failed Status: 5.1.1 Last-Attempt-Date: Wed, 14 Feb 2001 05:55:07 -0600
- Subject: Array lenght
- From: "Maarten Vries, de" <m_devries74@xxxxxxxxxxx>
- Date: Wed, 14 Feb 2001 11:45:52 +0100
Hi Can anyone tell me if it is possible to get the length of a CHAR array? When I use this code: char[] letters = current.toCharArray(); for (int count2 = 0; count2<letters.lenght; count2++) I get the message: Wheel.java:33: Attempt to reference field lenght in a char[]. for (int count2 = 0; count2<letters.lenght; count2++) { Maarten _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.