Create a method called countSelected, which takes an array of integers and an integer as input parameters and returns the number of occurences of the integer in the array.

Example:
data:{2, 1, 1, 8, 1, 0}
select:1
==> 3

public int countSelected (int[] data, int select) {

To create a method called `countSelected` that counts the occurrences of an integer in an array, we can follow these steps:

1. Declare a variable called `count` and set its initial value to 0. This variable will keep track of the number of occurrences of the selected integer.
2. Iterate over each element in the `data` array using a for loop.
3. Within the loop, check if the current element is equal to the `select` integer.
4. If the current element is equal to the `select` integer, increment the `count` variable by 1.
5. After the loop finishes, return the value of the `count` variable as the final result.

Here's the code implementation:

```java
public int countSelected(int[] data, int select) {
int count = 0;

for (int i = 0; i < data.length; i++) {
if (data[i] == select) {
count++;
}
}

return count;
}
```

Now you can call the `countSelected` method, passing in the `data` array and the `select` integer as arguments, and it will return the number of occurrences of the `select` integer in the `data` array.