Although what you did was quite similar to what i want now that ive looked at it properly. But is it possible that the name "jack" could be in the code instead of having to enter it in an input box after entering all of the other names? If so would that be using string.comparet o?
Java beats me so much :D
User Profile
Collapse
-
Erm not really like that no. The names that are entered in to the input box would be then compared with the name "jack", then the names alphabetically after the name "jack" should be displayed.
So for example if these Names were entered:
Ben Toby Allen Zack Sally Richard
The following would be displayed at the end:
Richard Sally Toby Zack (in alphabetical order)...Leave a comment:
-
Hey, ive managed to complete this one, but thanks for your time anyway. I was wondering if you could help me with a piece of code that i wrote a while ago.
...Code:import javax.swing.JOptionPane; import java.util.Arrays; class NameHolder { String[] names = new String[10]; public NameHolder() { int i; String op = ""; // Get names for(iLeave a comment:
-
Java help needed, brain ready to explode!
Im about ready to throw myself out of a window for this piece of work that i need to do. I need an array of English sentences. Which will list all those words from all the sentences that contain one or more character 'm'. Use an input dialog box to read the sentences into the array and an output dialog box to display the required words (7 words per line). The number of sentences will not exceed 5.
Now i *think* ive figured out that... -
That's brillaint thanks, and opne more question (im a cheeky so and so, i know) I need to
-Create a 50-element integer array
-Fills this array with the random numbers in the range 1 to 10000 and display it.
I *think* i know how i create the integer and random numbers, with the code below - but im not 100% sure on how i should go about displaying it, any help again would be brilliant.
...Code:int[]
Leave a comment:
-
Java help needed.. badly.
Hey im stuck on a question that i need to do, i have pretty much the basics of the programme but am not sure how to get it implemented so that it'll work. The question is :
Declare a two dimensional array with 10 rows and 10 columns and initialise:
a) All the elements of its third row to 10
b) All the elements of its 6th column to 20
c) And all the other elements to 5
in that order.
I have...
No activity results to display
Show More
Leave a comment: