求java 小程序 123随机排列组合 3位 111 112 113 121 122 123 131 132 133 ....

403关注1898浏览

共4条回答
  • 荼蘼
    7年前

    public class Testb {
    public static void main(String[] args){
    String[] strs =new String[]{"1","2","3"};
    List list =new ArrayList<String>();
    for(int i=0;i<3;i++){
    for(int j=0;j<3;

    0 11

  • 酸奶麦片粥
    7年前

    '

    0 10

  • Cody
    7年前

    你 要的是 所有的组合 还是用 math.random()方法 通过对4余模 得到一个随机的下标 确定 数字?不知道 一楼的是不是你要的答案,
    package com.baidu.lib;

    public class Myrandom {
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    int m =0;
    int[]

    0 6

  • Asha
    7年前

    我用.net写了一个 你改为java就可以了 随机哦
    private void WriteNum()
    {
    IList<string> arrayNum = new List<string>();
    int[] str = { 1,2,3};
    while (true)
    {

    0 5

发送