Comment on Tutorial - for loop in java By Abinaya



Comment Added by : jatin kapoor

Comment Added at : 2011-01-22 03:43:10

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);
}
}
}
its output is wrong
please check out


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. why we use int with main
View Tutorial          By: praveen at 2012-03-26 04:28:20

2. Hello, this is a very good post. I'm a newbee in J
View Tutorial          By: Brian at 2013-04-11 09:07:33

3. Excellent Example...... To understand the concept
View Tutorial          By: SUNNY at 2009-02-24 23:41:04

4. Hi
I tried to use this class , I don't get

View Tutorial          By: arnav at 2015-03-27 06:01:22

5. Good intro..
View Tutorial          By: thirunavukkarasu at 2015-01-30 17:32:10

6. It's very easy to learn try / catch functionality.
View Tutorial          By: Ponraj at 2013-01-31 04:21:06

7. DO NOT USE QSORT IN A C++ CODE.

If

View Tutorial          By: paercebal at 2008-08-13 05:06:45

8. hello,
i have completed my bsc(computer sci

View Tutorial          By: Geeta at 2012-07-25 13:35:07

9. Yesu. Thenk a u vely muchos. HURRRRR
View Tutorial          By: hurr durr at 2013-09-19 19:50:23

10. Your output is not correct.. Give the correct out
View Tutorial          By: Surendrakumar at 2014-06-04 07:00:16