× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Alistair,

Just to clarify.... length as used in referring to an array is not a
METHOD.  It's a public variable.  I belive that there are a couple of
objects which have a method length(), but most use size().

Nick




"Alistair Rooney" <alistairr@tbsa.co.za>@midrange.com on 02/14/2001
09:01:57 AM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   <JAVA400-L@midrange.com>
cc:

Subject:  RE: ARRAY - Char


Maarten,

Length is a valid method (Irrespective of your primitive data type). I
don't
know why it's not working. Where are you compiling this?

Alistair



-----Original Message-----
From: owner-java400-l@midrange.com
[mailto:owner-java400-l@midrange.com]On Behalf Of Maarten Vries, de
Sent: Wednesday, February 14, 2001 2:04 PM
To: JAVA400-L@midrange.com
Subject: ARRAY - Char


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.



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.