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.
There are 4 different looping statements in Java. They are:While loopDo-While loopFor loopFor Each loop
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.
Java is object oriented, C is not...
kamina
kamina
Unix is an operating system, Java is a language.
The for and while statements are entry-controlled loops. The do-while statement is an exit-controlled loop.
Rowset
JAD-Java Application Description JAR-Java archive