/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
Randomly permutes the specified String?
Fra : somez72


Dato : 24-11-01 01:57

HI, everybody.

I'm beginer in java.
let's suppose , I defined String str = "abcd";
I want to get every case string , Randomly permutes the specified list.

could someone show me, how to do it with java.
==========================
abcd
abdc
acbd
acdb
adbc
adcb

bacd
badc
bdad
bdda
bcad
bcda

cabd
cadb
cbad
cbda
cdab
cdba

dabc
dacb
dbac
dbca
dcab
dcba

any comment will be help me!!!
thank you for your time.







 
 
Brian Matzon (23-11-2001)
Kommentar
Fra : Brian Matzon


Dato : 23-11-01 09:10

"somez72" <somez72@chollian.net> wrote in message news:9tkv0m$3if$1@news1.kornet.net...
> HI, everybody.
>
> I'm beginer in java.
> let's suppose , I defined String str = "abcd";
> I want to get every case string , Randomly permutes the specified list.

Sounds very much like a homework! - besides this is a DANISH news group,
head on over to comp.lang.java.*

/Brian Matzon



Christian Damsgaard (23-11-2001)
Kommentar
Fra : Christian Damsgaard


Dato : 23-11-01 09:24

Brug evt. StringBuffer klassen.

/Christian

"Brian Matzon" <brian@matzon.dk> wrote in message
news:0vnL7.2914$TN1.166547@news000.worldonline.dk...
> "somez72" <somez72@chollian.net> wrote in message
news:9tkv0m$3if$1@news1.kornet.net...
> > HI, everybody.
> >
> > I'm beginer in java.
> > let's suppose , I defined String str = "abcd";
> > I want to get every case string , Randomly permutes the specified
list.
>
> Sounds very much like a homework! - besides this is a DANISH news group,
> head on over to comp.lang.java.*
>
> /Brian Matzon
>
>



Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408926
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste