please help me!!!!! the question in attachment

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

please help me!!!!! the question in attachment

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

1 Attachment
what the wrong ? import java.util.Scanner; public class Task2 { public static void main(String [] args){ Scanner input = new Scanner(System.in); System.out.println(" Size of Array : "); int in=input.nextInt(); int List[]= new int [size]; } public static boolean isSorted(int[] list){ boolean sorted = true; for (int i = 1; i < list.size(); i++) { if (list.get(i-1).compareTo(list.get(i)) != 1) sorted = false; } return sorted; } } }}
Without actually testing it, I can see that you have "int List[]= new int [size];" Note that you do not have a "size" variable :) You need to use the "in" variable which the user input first. After that, you also need to ask for the other numbers which the user will enter. You could create an for loop which will get "in"-number of variables that the user has typed in. To help you further, you should provide the error message you get when you run the program.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

here the error message which i get
1 Attachment
Change the [size] to [in]. To find out what is wrong with your program, you should read the message and look for red curly brackets underneath variables. If you hover your mouse over them, further information about what is wrong can be provided.
Or, from a logical standpoint, change the input line from in to size. This makes the variable name state what it is for.
Also, it looks like you are using Eclipse. As Ivanskodje points out, that should make hover work for errors. Watch for the red underlines. Let me make an error in some exiting code and show you what that is like.
You can also see on the left, near the line numbers, the error marker. There is another on the right, nect to the scroll bar, that gives a general idea of where in the file. So the ones on the right always show up where as the one on the left only shows when you can see the part of the file with the error.

Not the answer you are looking for?

Search for more explanations.

Ask your own question