if ((list.get(i)) > (list.get(maxInd))) {
maxInd = i;
}
error giving in on operator, where list is an object of LinkedList and MaxInd contains the first element of linked list while i is the variable of for loop
LinkedList list = new LinkedList();
list.add(2);
list.add(1);
list.add(3);
int maxInd = 0;
int list_size = list.size();
for (int i = 0; i < list_size; i++) {
if((list.get(i)) > (list.get(MaxInd))) {
maxInd = i;
} // end if condition
} // end for loop