The most important differences are:
a. The while loop starts with a condition whereas the condition is the line of code in case of a do while loop
b. The do while loop is guaranteed to run the loop body atleast once even if the condition is an impossible to satisfy but such a guarantee is not available with the normal while loop
The for and while statements are entry-controlled loops. The do-while statement is an exit-controlled loop.
You use loops in Java when you want a set of actions to be repeated until a particular condition is met or for a certain number of times.The different types of loops in Java are:For LoopsDo-While LoopsWhile Loops
Both For and While loops are available for the purpose of executing a piece of java code repeatedly until a particular condition is met. The only difference being - the loop condition/counter has to be modified inside the while loop every time whereas the condition is integrated in the for loop definition. Otherwise both the loops are exactly same in all aspects.
A Java applet is embedded within a web page, while a Java application will run directly on your computer.
The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.
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.
"==" 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.
Loops in Java Script are:for - loops through a block of code a specified number of timeswhile - loops through a block of code while a specified condition is truedo...while - also loops through a block of code while a specified condition is truefor...in - loops through the properties of an objectFor more information, visit the Related Link.
Java is object oriented, C is not...
kamina
kamina
Unix is an operating system, Java is a language.