Now at this part I am kind of lost, please give me time to look for it and try to understand what you are saying.
Type: Posts; User: belinyom
Now at this part I am kind of lost, please give me time to look for it and try to understand what you are saying.
1. My bad, I only want the user to input a number that is within the array list once, I will put that outside the loop and before it.
2. from my understanding to the 'there needs to be a code to get...
import java.util.ArrayList;
import java.util.Scanner;
public class IndexOf {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
...
for (int loopValue = 0; loopValue < arrayList.size(); loopValue++) {
System.out.println(arrayList.get(loopValue));
}
I believe this is what you were referring to, printing...
public class IndexOf {
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
ArrayList<Integer> arrayList = new ArrayList<>();
int...
Yes the code would be: system.out.println(arrayList); after the while loop to list [all the array elements I have inputted], do correct me if I am wrong please.
If I have 5 elements in an array...
I have been given an exercise to find how many times has a certain index (content value) has been occured as well as the maximum and minimum value index in an array list. For example, if the user...