Java - Write code to sort characters in a string

Requirements

Write code to sort characters in a string

Demo

//package com.book2s;
import java.util.Arrays;

public class Main {
    public static void main(String[] argv) {
        String string = "book2s.com";
        System.out.println(sort(string));
    }/*from   www  .j ava 2  s .  com*/

    public static String sort(String string) {
        char[] characters = string.toCharArray();
        Arrays.sort(characters);
        return String.valueOf(characters);
    }
}