package javaLearning; import java.util.Arrays; import java.util.Collections; public class myarray { public static void name() { String hello; hello = "hello, world"; int hello_len = hello.length(); char[] hello_array = new char[hello_len]; hello.getChars(0, hello_len, hello_array, 0); Arrays.sort(hello_array, Collections.reverseOrder()); }
the "myarray" class is defined by the main method of the test class. why does this give me a compilation error when i try to modify an array?
source share