This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Strign of arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Strign of arrays" Watch "Strign of arrays" New topic

Strign of arrays

tavo alfonso

Joined: Nov 02, 2006
Posts: 7
what is the easy way to move one position the string of an array i mean.


so i have

what i want to do is something like these

just move one space the array
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
something like this (maybe??)

Mateus Lucio
Ranch Hand

Joined: Jul 27, 2006
Posts: 60
Use another variable to hold the value, while you switch the others characters, like bubblesort(if you know this one!)

Studying ...
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Hi Tavo,

don't use an array. Use a java.util.LinkedList.

Then you just move it by saying:

Object moved = linkedListName.removeFirst();

will move an element from the head of the list to its tail.


all events occur in real time
I agree. Here's the link:
subject: Strign of arrays
It's not a secret anymore!