How to Sort Array in Groovy - Code Snippet

How to perform 'Sort Array' in Groovy.

example.groovy
// Task: Sort Array
// Language: Groovy

def sort_array() {
    // Implementation for Sort Array
    def result = ...; // Initialize variable
    // TODO: Implement core logic here
    // Step 1: Prepare data
    // Step 2: Process Sort Array
    println("Done");
}
AdSense Slot