~ Mansukh
Life is easy because we write the source code.....
Campbell Ritchie wrote:Write down each of those Strings, then the numeric values of their respective characters (I think you can confine your attentions to the second character if they all start with >, except for "f " and "ff" where you look at the 3rd character too). If you have difficulty working out the numeric values, refer to this Unicode page.
Google for ASCIIbetical order.
By the way: because you used System.out.print rather than System.out.println, your output is very difficult to understand.
~ Mansukh
SCJP6.0,My blog Ranchers from Delhi
Jesper Young wrote:Due to a bug in the forum software (we're looking into it), this messes up some of the source code between the tags.
That is a gross over-simplification. Did you look at the Unicode link I quoted earlier?shanky sohar wrote: . . . natural order.........
which
1.white space....
2.capital later
3.small letter
. . .
Campbell Ritchie wrote:The <> brackets are part of the Strings. They are printing in ordinary ASCIIbetical order, as I hinted earlier.
~ Mansukh
Regards, Rene Larsen
Rene Larsen wrote:Where in the output should < come before > ??
Each element in the array start with a > and end with a < - it is what is been placed between them you need to look at.
~ Mansukh
Mansukhdeep Thind wrote:
Rene Larsen wrote:Where in the output should < come before > ??
Each element in the array start with a > and end with a < - it is what is been placed between them you need to look at.
Hi Rene
So you mean to say that the angle brackets are not a part of the String elements? But Campbell said the opposite. Please clarify whether the angles are a part of the string elements while prioritizing or not.
Regards
Mansukhdeep
Regards, Rene Larsen
Not "whitespace" but the "space" character. There are other whitespace characters which come after F.Mansukhdeep Thind wrote: . . . 'White space' comes before 'F' . . .
Rene Larsen has given you the answer to this twice. Each string starts with > and ends with < so you always get >: before <. As you say, they are the same in all elements.Hence, < should come before >. But in the output it is the opposite(> f<). How come?
Campbell Ritchie wrote:
Not "whitespace" but the "space" character. There are other whitespace characters which come after F.Mansukhdeep Thind wrote: . . . 'White space' comes before 'F' . . .
Rene Larsen has given you the answer to this twice. Each string starts with > and ends with < so you always get >: before <. As you say, they are the same in all elements.Hence, < should come before >. But in the output it is the opposite(> f<). How come?
~ Mansukh
Consider Paul's rocket mass heater. |