What is difference between Iterator and for loop

Answer Posted / vijayakumar chinnasamy

In iterator the remove() is available to remove the
content/item but in for loop remove() not available.

Is This Answer Correct ?    52 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path.

1778


What lambda means?

755


Is array an object in java?

723


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

757


How does predicate work in java?

758


What is bitwise complement?

712


What is difference between next () and nextline () in java?

745


Can you explain the cs option of java interpreter?

695


What is a ternary operator in java? What is an interface?

753


What is a variable and constant?

762


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

859


Is Constructor possible in abstract class in java ?

792


How would you use Bubble Sort to sort the number of elements?

808


Write a method that will remove given character from the string?

763


What is io stream in java?

732