answersLogoWhite

0

Both for and while belongs to repetitive controls structure. for is used when a user does not know how manytimes the looping needs to be executed i.e. infinite in some cases.Also in case of for initialization,condition and step decrement/ increment can take place in a single loop. In viceversa case while is used. In case of while we first check the condition if it is satisfied , only then execute the statements present below the loop. Both for and while belongs to repetitive controls structure. for is used when a user does not know how manytimes the looping needs to be executed i.e. infinite in some cases.Also in case of for initialization,condition and step decrement/ increment can take place in a single loop. In viceversa case while is used. In case of while we first check the condition if it is satisfied , only then execute the statements present below the loop.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What are the three looping statements in java PL?

There are 4 different looping statements in Java. They are:While loopDo-While loopFor loopFor Each loop


What is an important difference between writing a Java application and a Java applet?

A Java applet is embedded within a web page, while a Java application will run directly on your computer.


What are the different between'a' and ''a in java string methods?

The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.


What is difference between java 2 and java 5?

They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.


Difference between equals equals and equal in java?

"==" in java is the binary operator which compares two values and gives a boolean result While "=" in java is a assignment operator which assigns a value to a variable.


Major difference between c and java?

Java is object oriented, C is not...


What is the difference between connectivity in java?

kamina


What is difference between connectivity in java?

kamina


What is the main difference between UNIX and JAVA?

Unix is an operating system, Java is a language.


Which java loops are entry controlled?

The for and while statements are entry-controlled loops. The do-while statement is an exit-controlled loop.


Difference between recordset and resultset in java?

Rowset


What is the difference between JAD and JAR?

JAD-Java Application Description JAR-Java archive