RE: [OT] Java Trivia

2003-06-13 Thread Daniel Joshua
if (FRIDAY[13].length != FRIDAY.size){
laugh();
}

Regards,
Daniel


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June, 2003 11:24 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Well it is [FRIDAY] the 13th...

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June 2003 01:54
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


And thanks for making it worse.

-Original Message-
From: Steven Sajous [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:39 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-13 Thread Mark Galbreath
You're hilarious.

not.

-Original Message-
From: Daniel Joshua [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2003 2:04 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


if (FRIDAY[13].length != FRIDAY.size){
laugh();
}

Regards,
Daniel


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June, 2003 11:24 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Well it is [FRIDAY] the 13th...

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June 2003 01:54
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


And thanks for making it worse.

-Original Message-
From: Steven Sajous [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:39 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-13 Thread Brian Lee
Take it easy Hanover.

BAL

From: Mark Galbreath [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' 
[EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: RE: [OT] Java Trivia
Date: Fri, 13 Jun 2003 07:03:23 -0400

You're hilarious.

not.

-Original Message-
From: Daniel Joshua [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 2:04 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia
if (FRIDAY[13].length != FRIDAY.size){
laugh();
}
Regards,
Daniel
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June, 2003 11:24 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia
Well it is [FRIDAY] the 13th...

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June 2003 01:54
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia
And thanks for making it worse.

-Original Message-
From: Steven Sajous [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:39 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia
this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia
Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post
-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia
and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..
-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia
okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely 
is
since you have 'months[ i ]'

In the same way +27 is a language convenience

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Java Trivia

2003-06-12 Thread David Graham
That won't compile.  length() is a method on String not a property.

David


Anybody know why the length of a String is a property of the String when
used as a logical qualifier in a for{} block but a function of the String 
in
a conditional if{} statement?

for( int i = 0; i  string.length; i++ ) {}

if( string.length() != 4 ) {}

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Java Trivia

2003-06-12 Thread Jarnot Voytek Contr AU HQ/SC
for( int i = 0; i  string.length; i++ ) {}

doesn't compile for me...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 8:46 AM
 To: 'Struts Users Mailing List'
 Subject: [OT] Java Trivia
 
 
 Anybody know why the length of a String is a property of the 
 String when
 used as a logical qualifier in a for{} block but a function 
 of the String in
 a conditional if{} statement?
 
 for( int i = 0; i  string.length; i++ ) {}
 
 if( string.length() != 4 ) {}
 
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Java Trivia

2003-06-12 Thread Firat TIRYAKI
well, what's the message you are getting?

F.

- Original Message - 
From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 5:01 PM
Subject: RE: [OT] Java Trivia


 for( int i = 0; i  string.length; i++ ) {}
 
 doesn't compile for me...
 
 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.
 
 
  -Original Message-
  From: Mark Galbreath [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 12, 2003 8:46 AM
  To: 'Struts Users Mailing List'
  Subject: [OT] Java Trivia
  
  
  Anybody know why the length of a String is a property of the 
  String when
  used as a logical qualifier in a for{} block but a function 
  of the String in
  a conditional if{} statement?
  
  for( int i = 0; i  string.length; i++ ) {}
  
  if( string.length() != 4 ) {}
  
  
  Mark
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Witbeck, Shane
umm... String.length() not String.length ?


-Original Message-
From: Firat TIRYAKI [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:07 AM
To: Struts Users Mailing List
Subject: Re: [OT] Java Trivia


well, what's the message you are getting?

F.

- Original Message - 
From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 5:01 PM
Subject: RE: [OT] Java Trivia


 for( int i = 0; i  string.length; i++ ) {}
 
 doesn't compile for me...
 
 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.
 
 
  -Original Message-
  From: Mark Galbreath [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 12, 2003 8:46 AM
  To: 'Struts Users Mailing List'
  Subject: [OT] Java Trivia
  
  
  Anybody know why the length of a String is a property of the 
  String when
  used as a logical qualifier in a for{} block but a function 
  of the String in
  a conditional if{} statement?
  
  for( int i = 0; i  string.length; i++ ) {}
  
  if( string.length() != 4 ) {}
  
  
  Mark
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mike Whittaker

Anybody know why the length of a String is a property of the String when
used as a logical qualifier in a for{} block but a function of the 
String in
a conditional if{} statement?

for( int i = 0; i  string.length; i++ ) {}

if( string.length() != 4 ) {}


Mark

for( int i = 0; i  string.length; i++ ) {}

You can't do this.

Even though a string is just a char[].

--
Mike W




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mark Galbreath
yes it will - I've been doing it all morning.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Java Trivia


That won't compile.  length() is a method on String not a property.

David


Anybody know why the length of a String is a property of the String 
when used as a logical qualifier in a for{} block but a function of the 
String in a conditional if{} statement?

for( int i = 0; i  string.length; i++ ) {}

if( string.length() != 4 ) {}


Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Josh Rayls
Doesn't compile for me either.



-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


yes it will - I've been doing it all morning.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Java Trivia


That won't compile.  length() is a method on String not a property.

David


Anybody know why the length of a String is a property of the String 
when used as a logical qualifier in a for{} block but a function of the 
String in a conditional if{} statement?

for( int i = 0; i  string.length; i++ ) {}

if( string.length() != 4 ) {}


Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Java Trivia

2003-06-12 Thread Mark Galbreath
Here's my code - it compiles just fine.  Note the string.length in the for{}
and the string.length() in the if{}:

test = st.nextToken();
if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){
  month = true;
  break;
}
  }
if( !month ) { return false; }
  test = st.nextToken();

  if( test.length()  3 || test.length()  2 ) {
return false;

  } else {
StringTokenizer token = new StringTokenizer( test, , );

while( token.hasMoreTokens() ) {
  int i = 0;
  if( !Character.isDigit( token.nextToken().charAt( i ))) { return
false; }
  i++;
  }
}

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:02 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


for( int i = 0; i  string.length; i++ ) {}

doesn't compile for me...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 8:46 AM
 To: 'Struts Users Mailing List'
 Subject: [OT] Java Trivia
 
 
 Anybody know why the length of a String is a property of the
 String when
 used as a logical qualifier in a for{} block but a function 
 of the String in
 a conditional if{} statement?
 
 for( int i = 0; i  string.length; i++ ) {}
 
 if( string.length() != 4 ) {}
 
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Kevin A. Palfreyman
month is String[]
test is String

arrays have .length
String object has .length()


Kev

 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: 12 June 2003 15:32
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Java Trivia
 
 
 Here's my code - it compiles just fine.  Note the 
 string.length in the for{}
 and the string.length() in the if{}:
 
 test = st.nextToken();
 if( test.equals(   )) { return false; }
 
   for( int i = 0; i  months.length; i++ ) {
 
 if( test.equals( months[ i ] )){
   month = true;
   break;
 }
   }
 if( !month ) { return false; }
   test = st.nextToken();
 
   if( test.length()  3 || test.length()  2 ) {
 return false;
 
   } else {
 StringTokenizer token = new StringTokenizer( test, , );
 
 while( token.hasMoreTokens() ) {
   int i = 0;
   if( !Character.isDigit( token.nextToken().charAt( i ))) { return
 false; }
   i++;
   }
 }
 
 -Original Message-
 From: Jarnot Voytek Contr AU HQ/SC 
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:02 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


for( int i = 0; i  string.length; i++ ) {}

doesn't compile for me...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 8:46 AM
 To: 'Struts Users Mailing List'
 Subject: [OT] Java Trivia
 
 
 Anybody know why the length of a String is a property of the
 String when
 used as a logical qualifier in a for{} block but a function 
 of the String in
 a conditional if{} statement?
 
 for( int i = 0; i  string.length; i++ ) {}
 
 if( string.length() != 4 ) {}
 
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Java Trivia

2003-06-12 Thread Jeff Kyser
months appears to be an array of strings, and arrays have a .length 
property

On Thursday, June 12, 2003, at 09:31  AM, Mark Galbreath wrote:

Here's my code - it compiles just fine.  Note the string.length in the 
for{}
and the string.length() in the if{}:

test = st.nextToken();
if( test.equals(   )) { return false; }
  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){
  month = true;
  break;
}
  }
if( !month ) { return false; }
  test = st.nextToken();
  if( test.length()  3 || test.length()  2 ) {
return false;
  } else {
StringTokenizer token = new StringTokenizer( test, , );
while( token.hasMoreTokens() ) {
  int i = 0;
  if( !Character.isDigit( token.nextToken().charAt( i ))) { return
false; }
  i++;
  }
}
-Original Message-
From: Jarnot Voytek Contr AU HQ/SC 
[mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:02 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia

for( int i = 0; i  string.length; i++ ) {}

doesn't compile for me...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 8:46 AM
To: 'Struts Users Mailing List'
Subject: [OT] Java Trivia
Anybody know why the length of a String is a property of the
String when
used as a logical qualifier in a for{} block but a function
of the String in
a conditional if{} statement?
for( int i = 0; i  string.length; i++ ) {}

if( string.length() != 4 ) {}

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Java Trivia

2003-06-12 Thread David Graham
Here's my code - it compiles just fine.  Note the string.length in the 
for{}
and the string.length() in the if{}:
I'm sure it does but not because you magically found a way to reference 
string.length.  Look at your code more closely, you're using an array not a 
String.

David


test = st.nextToken();
if( test.equals(   )) { return false; }
  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){
  month = true;
  break;
}
  }
if( !month ) { return false; }
  test = st.nextToken();
  if( test.length()  3 || test.length()  2 ) {
return false;
  } else {
StringTokenizer token = new StringTokenizer( test, , );
while( token.hasMoreTokens() ) {
  int i = 0;
  if( !Character.isDigit( token.nextToken().charAt( i ))) { return
false; }
  i++;
  }
}
-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:02 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia
for( int i = 0; i  string.length; i++ ) {}

doesn't compile for me...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.
 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 8:46 AM
 To: 'Struts Users Mailing List'
 Subject: [OT] Java Trivia


 Anybody know why the length of a String is a property of the
 String when
 used as a logical qualifier in a for{} block but a function
 of the String in
 a conditional if{} statement?

 for( int i = 0; i  string.length; i++ ) {}

 if( string.length() != 4 ) {}


 Mark



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Java Trivia

2003-06-12 Thread Jarnot Voytek Contr AU HQ/SC
months is an array, not a String

 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 9:32 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Java Trivia
 
 
 Here's my code - it compiles just fine.  Note the 
 string.length in the for{}
 and the string.length() in the if{}:
 
 test = st.nextToken();
 if( test.equals(   )) { return false; }
 
   for( int i = 0; i  months.length; i++ ) {
 
 if( test.equals( months[ i ] )){
   month = true;
   break;
 }
   }
 if( !month ) { return false; }
   test = st.nextToken();
 
   if( test.length()  3 || test.length()  2 ) {
 return false;
 
   } else {
 StringTokenizer token = new StringTokenizer( test, , );
 
 while( token.hasMoreTokens() ) {
   int i = 0;
   if( !Character.isDigit( token.nextToken().charAt( i ))) { return
 false; }
   i++;
   }
 }
 
 -Original Message-
 From: Jarnot Voytek Contr AU HQ/SC 
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 12, 2003 10:02 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Java Trivia
 
 
 for( int i = 0; i  string.length; i++ ) {}
 
 doesn't compile for me...
 
 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.
 
 
  -Original Message-
  From: Mark Galbreath [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 12, 2003 8:46 AM
  To: 'Struts Users Mailing List'
  Subject: [OT] Java Trivia
  
  
  Anybody know why the length of a String is a property of the
  String when
  used as a logical qualifier in a for{} block but a function 
  of the String in
  a conditional if{} statement?
  
  for( int i = 0; i  string.length; i++ ) {}
  
  if( string.length() != 4 ) {}
  
  
  Mark
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mike Whittaker

 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mark Galbreath
okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Kandi Potter
and here I thought it was a trick question, where you had subclassed String as string 
class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread David Graham
String is a final class so you can't subclass it.

David

and here I thought it was a trick question, where you had subclassed String 
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia
okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely 
is
since you have 'months[ i ]'

In the same way +27 is a language convenience

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Java Trivia

2003-06-12 Thread Kandi Potter
thanks.of course I haven't tried to myself.   

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:32 AM
To: [EMAIL PROTECTED]
Subject: RE: [OT] Java Trivia


String is a final class so you can't subclass it.

David

and here I thought it was a trick question, where you had subclassed String 
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



  if( test.equals(   )) { return false; }

   for( int i = 0; i  months.length; i++ ) {

 if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely 
is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mike Jasnowski
Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Steven Sajous
this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Mark Galbreath
And thanks for making it worse.

-Original Message-
From: Steven Sajous [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 1:39 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Java Trivia

2003-06-12 Thread Andrew Hill
Well it is [FRIDAY] the 13th...

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June 2003 01:54
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


And thanks for making it worse.

-Original Message-
From: Steven Sajous [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:39 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


this was the worse thread I have seen here for sure.

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


Or string could have been some other class than String, I don't recall
seeing the declaration shown in the original post

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia


and here I thought it was a trick question, where you had subclassed String
as string class and added a public member length.   ..

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Java Trivia


okay, okay, let it rest.  I feel st00pid enough already!

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: [OT] Java Trivia



 if( test.equals(   )) { return false; }

  for( int i = 0; i  months.length; i++ ) {

if( test.equals( months[ i ] )){

I see no 'string.length'

If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
since you have 'months[ i ]'

In the same way +27 is a language convenience


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]