Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Main {

    public static String random(String src) {
        String[] srcList = src.split("");
        List<String> list = Arrays.asList(srcList);
        Collections.shuffle(list);
        StringBuilder result = new StringBuilder();
        for (String i : list) {
            result.append(i);
        }
        return result.toString();
    }
}