Password,
You need to move this line of questioning to a Java Forum. The questions
you are asking has nothing to do with Tomcat running/setup.
On 6/28/06, password password <[EMAIL PROTECTED]> wrote:
Hi I have created this class (ExampleClass as Ségio told me) but and I
don't know how i can
Hi I have created this class (ExampleClass as Ségio told me) but and I don't
know how i can see the content the List with the position. I have put this but
it return an error
for (int i = 0; i < listToSort.size(); i++) {
System.out.println(listToSort.get(i));
}
S
and destroy the original
message without making a copy. Thank you.
- Original Message -
From: "password password" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, June 27, 2006 12:03 PM
Subject: Re: sort an array
> >Yes, you need to crea
this helps.
Cheers,
Gordon Smith
-Original Message-
From: password password [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 10:57 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: sort an array
Hi,
Arrays.sort(astrName);
I can not use the sort method because
This is just basic Java coding. Search on google for an example. I am sure
there are tons out there.
On 6/27/06, password password <[EMAIL PROTECTED]> wrote:
>Yes, you need to create an array of a data bean/value bean/private class
>(whatever buzz word you want to give) and then sort that arra
>Yes, you need to create an array of a data bean/value bean/private class
>(whatever buzz word you want to give) and then sort that array. So you
>would have an array of arrays and then sort the array of arrays.
Can you put an example of this (array of arrays)? How can I do the order with
this
array.
Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: password password [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 8:57 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: sort an array
Hi,
Arrays.sort(astrName);
I can not use th
remove
it from the other array.
Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: password password [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 8:57 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: sort an array
Hi,
Arrays.sort
omcat Users List , [EMAIL PROTECTED]
cc
Subject
Re: sort an array
Hi,
Arrays.sort(astrName);
I can not use the sort method because I have the arrays have an
relation. I mean, the first element of astrName have relation with first
element of adblBackground1, adblBackground2, a
Hi,
Arrays.sort(astrName);
I can not use the sort method because I have the arrays have an relation. I
mean, the first element of astrName have relation with first element of
adblBackground1, adblBackground2, adblItensity1 and
adblItensity2.
Then I can sort each array indepe
This first class should be you domain object.
You should add all related data here.
public class ExampleClass implements Comparable {
public String astrName;
/*
* All other members you need here
*
*/
public ExampleClass(String astrName) {
this.astrName = astrName;
Search on Interface of Collections (specifically the comparable method).
This should allow you to write your own way to compare objects and thus the
Java engine will sort based upon your comparable method.
On 6/27/06, password password <[EMAIL PROTECTED]> wrote:
Hi,
Arrays.sort(astrName);
Hi,
Arrays.sort(astrName);
I can not use the sort method because I have the arrays have an relation. I
mean, the first element of astrName have relation with first element of
adblBackground1, adblBackground2, adblItensity1 and
adblItensity2.
Then I can sort each array indepe
Looks like you are using 2 order N loops. why not use quicksort ? Tomcat
may have nothing to do with it.
Thanks
- Rajeev.
password password wrote:
Please, can you put an example? I don't know how put the compareTo Method in my
servlet.
Sérgio Costa <[EMAIL PROTECTED]> escribió: Put them in
You put the compareTo object on the object to be compared.
You could also try:
java.utils.Arrays.sort(Object[] array, Comparator comp)
There are plenty of tutorials to be found via Google on the use of both
this and Collections.sort().
password password wrote:
> Please, can you put an example?
Please, can you put an example? I don't know how put the compareTo Method in my
servlet.
Sérgio Costa <[EMAIL PROTECTED]> escribió: Put them in a list and
Collections.sort() them.
All you'll need to do is create a Class with all those fields implementing
Comparable, and implement the compareTo
Put them in a list and Collections.sort() them.
All you'll need to do is create a Class with all those fields implementing
Comparable, and implement the compareTo Method.
hope it helps
SC
On 6/26/06, password password <[EMAIL PROTECTED]> wrote:
Hi,
I have a servlet and in this servlet I h
17 matches
Mail list logo