The Artima Developer Community
Sponsored Link

Java Answers Forum
Alphabetical programme

5 replies on 1 page. Most recent reply: Apr 8, 2002 10:47 AM by Lynn Hollerman

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
Kelly Adabla

Posts: 4
Nickname: zaz009
Registered: Mar, 2002

Alphabetical programme Posted: Apr 1, 2002 1:26 PM
Reply to this message Reply
Advertisement
Can any one out there please write me a programme that sorts names in alphabetical order. please give a documentation of the approach used to solve the problem
please post my response ASAP
thank you
kelly


Chet Underwood, Esq.

Posts: 14
Nickname: chet
Registered: Mar, 2002

Re: Alphabetical programme Posted: Apr 1, 2002 1:54 PM
Reply to this message Reply
ASAP? Why didn't you post this at the start of the semester when you got the assignment instead of waiting 'til the last minute? If you are going to ask others to do your (very easy) homework, the least you can do is be courteous enough to not request it be done quickly, especially when you are too damned lazy to do your own work in a timely (or any other) fashion. And doing the least you can seems to be your specialty, so you have no excuse for this outrage.

Kelly Adabla

Posts: 4
Nickname: zaz009
Registered: Mar, 2002

Re: Alphabetical programme Posted: Apr 3, 2002 1:27 AM
Reply to this message Reply
this is an advance programming assignment, and all i need is a programme that sort names in alphabetical order.
no need to put me down.
cheers

Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: Alphabetical programme Posted: Apr 8, 2002 9:25 AM
Reply to this message Reply
I believe you gonna have to burn the midnight oil !

Thomas,

Panagiotis Plevrakis

Posts: 2
Nickname: panos
Registered: Apr, 2002

Re: Alphabetical programme Posted: Apr 8, 2002 9:54 AM
Reply to this message Reply
I will be nice to you and give you a hint though you shouldn't be so lazy. Take a look at java.util.Arrays and use the sort method. Don't expect me to write the program for you. I think it is piece of cake to pass your name array in the sort method.

cheers Panos

Lynn Hollerman

Posts: 67
Nickname: gmholler
Registered: Mar, 2002

Re: Alphabetical programme Posted: Apr 8, 2002 10:47 AM
Reply to this message Reply
Kelly,
When you first posted this request, I thought I ought to look into what was needed, as I didn't know how to answer. I learned a LOT in looking around - and I found a few different ways to do this. In java.util.Array, the Array.sort() method works well. And putting the names into a Vector and using the Collections.sort() method in java.util.Vector works really nicely, too. Just look at the java API docs on the Sun site (like the ones at http://java.sun.com/j2se/1.4/docs/api/index.html). This is a rather simple assignment - basically, the method call does most of the work, all you need do is get the array/vector set up and then the results printed out - are you sure there isn't more to it?

Lynn.

Flat View: This topic has 5 replies on 1 page
Topic: draw tilted oval Previous Topic   Next Topic Topic: newbie here.  jtable, combo box question

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use