I'm trying to sort an array into ascending order using sortOrder but i'm not having much luck. Can anyone help? Where is the code going wrong? It's throwing the following error
\Ascending.java:4: invalid method declaration; return type required
public static sortOrder()
^
1 error
Tool completed with exit code 1
class Ascending
{
//public static void main (String [] args)
public static sortOrder()
{
int [] c = {9,8,4,2,7,1,6,3,5};
for (sortOrder c : sortOrder.values())
System.out.println(c);
}
}

New Topic/Question
Reply



MultiQuote




|