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



Ask a Question

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. hello,
i have to connect the crystal report

View Tutorial          By: shanmugaraj at 2010-03-03 04:08:30

2. the 2 not required lines
1) #include

View Tutorial          By: saurabh at 2012-02-20 06:33:57

3. I want to using swith with string...
How to

View Tutorial          By: anuj at 2015-03-04 18:22:29

4. 3 - To build features that realize the control ele
View Tutorial          By: kosovari at 2012-01-30 13:52:54

5. Hi, I have mobile application developed in java w
View Tutorial          By: Meenu at 2008-12-30 02:46:54

6. lllllllllllllllllllllllllllllike
View Tutorial          By: duck at 2015-04-10 19:19:47

7. so what about, if i need to remove these letters f
View Tutorial          By: need Help at 2009-11-12 08:40:31

8. pls send more tutorial on my id
View Tutorial          By: vipin at 2012-11-17 07:23:49

9. it was so nice .................i can easily solve
View Tutorial          By: pravin at 2012-07-14 06:15:33

10. hi the code is working fine till step5 and am gett
View Tutorial          By: raj at 2008-09-16 22:55:40