Skip to content

Instantly share code, notes, and snippets.

@keokent
Last active December 17, 2015 16:39
Show Gist options
  • Save keokent/5640626 to your computer and use it in GitHub Desktop.
Save keokent/5640626 to your computer and use it in GitHub Desktop.
javaでつくった席替えスクリプトです。
import java.util.ArrayList;
import java.util.Collections;
public class Sekigae{
public static void main(String[] args){
ArrayList<String> list = new ArrayList<String>();
list.add("okkun");
list.add("kitak");
list.add("keoken");
list.add("gussan");
Collections.shuffle(list);
System.out.println(list.get(0) +" | "+ list.get(1) +" | "+
list.get(2) +" | "+ list.get(3));
}
}
@hfm
Copy link

hfm commented May 24, 2013

toString()でいいらしい。ぐええ。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment