Comment on Tutorial - for loop in java By Abinaya



Comment Added by : Aruna

Comment Added at : 2011-10-24 15:01:16

Comment on Tutorial : for loop in java By Abinaya
// Using the comma.
class Comma {
public static void main(String args[]) {
int a, b;
for(a=1, b=4; a<b; a++, bâ) {
System.out.println("a = " + a);
System.out.println("b = " + b);
}
}
}


Since there is a problem with the decrement operator in the given example you would get such kind of error. If you correct it, u will get the expected result.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. dear sir/madam
I am using netbeans IDE 7.0

View Tutorial          By: bangaram at 2011-07-19 12:03:04

2. I have got "time out at step 6". How can
View Tutorial          By: MCHON at 2008-10-05 12:36:42

3. Please
Can you help me ^-^
I use th

View Tutorial          By: HNO11 at 2011-03-28 11:08:28

4. thanks for to solve my doubts
View Tutorial          By: puttaswamy B S at 2010-09-28 00:45:47

5. can u give me the example simulation of strcat??
View Tutorial          By: farah at 2009-10-05 01:10:02

6. Yeah..it's very good example....
View Tutorial          By: Packiyaraj.T at 2010-07-22 22:39:48

7. I am getting this exeception when trying to send m
View Tutorial          By: praveen at 2012-12-27 11:15:14

8. abstract class Explain the concept of abstract c
View Tutorial          By: rahul at 2012-02-23 08:30:47

9. what is the output
View Tutorial          By: Raja at 2012-12-28 11:47:48

10. Thanks - very useful!
View Tutorial          By: Adam Musial-Bright at 2010-02-28 06:14:39