asked on
while(inCount <= 12){ // 12 is the variable that controls the growth of the Arraylist
listArrays.add(Arrays.asList(inCount + 0.1));
System.out.println("Current element in list Arrays: " + inCount +" "+ listArrays.get(inCount) + "\n");
//int count=listArrays.size();
boolean found = false;
String comString = listArrays.get(inCount).toString();
comString = comString.substring(1, comString.length() - 1);
System.out.print("This is the comString: " + comString.toString() + "\n");
if(comString.toString() == "7.1"){found = true;
if(found){
System.out.println("Bingo! You found it); " + listArrays.get(inCount) + "\n");
continue;
}
Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.
TRUSTED BY
ASKER
I'll have other questions, and I do appreciate your help. I'm working on HashMap now so please stay tuned.