Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the types of loops in Java, and how are they used?

Answer Posted / nashiinformaticssolutions

• In Java, for loops are used to repeatedly run statements for a specified number of times. When a programmer knows how many times to run a statement, they use a for loop.
•When some statements must run continuously until a condition is met, the while loop can be helpful. Before statements are executed in while loops, the condition is checked.
•With the exception of checking the condition after a block of statements has been executed, the do while loop is identical to the while loop. Do while loop statements should also run at least once.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

1070


What are the advantages of packages in java?

1428


What are methods and how are they defined?

1134


How you can force the garbage collection?

929


What is an i/o filter?

1661


Can we override tostring method in java?

923


Explain about fail fast iterators in java?

1014


What is the use of arraylist in java?

1027


How do you declare a variable?

1037


Can It is possible to synchronize the constructor of a Java Class?

1031


What is java ceil?

980


Is ++ operator thread-safe in java?

1100


How to instantiate static nested classes in java?

1011


Say any two properties in beans?

1019


How do you create a first line indent?

939