Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args){
- int[] result = insertionSort({10,3,4,12,2});
- }
- public static int[] insertionSort(int[] arr){
- return arr;
- }
- Exception in thread "main" java.lang.Error: Unresolved compilation problems:
- Syntax error on token(s), misplaced construct(s)
- Syntax error on token ")", delete this token
- public static void main(String[] args){
- int[] arr = {10,3,4,12,2};
- int[] result = insertionSort(arr);
- }
- public static int[] insertionSort(int[] arr){
- return arr;
- }
- int[] result = insertionSort(new int[]{10,3,4,12,2});
- int[] arr = {10,3,4,12,2};
- int[] arr; // already declared here but not initialized yet
- arr = {10,3,4,12,2}; // not a declaration statement so not allowed
- insertionSort({10,3,4,12,2})
- int[] result = insertionSort(new int[]{10,3,4,12,2});
Add Comment
Please, Sign In to add comment