Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

While Loop

                         

Loop is the control statement of any language in which whenever you want to perform the repetitious work then you use the Loop control statement. There are mainly three types of loops. Loop repeats a statement or a process multiple times according to the specified conditions. It allows the multiple statements or process to be run for the specified time or it also follows the certain conditions. Loop makes your program readable, flexible and reliable.

While loop: While loop checks the certain condition first, if the condition is true then all the statements or processes written under the while loop are executed otherwise ignored all.

The Syntax for the while loop:
                while(condition)
                {
                    statements;
                 }

In this program you will see how to use the while loop statement. This program take the value of variable n and generate the table of that number which is 2.

Here is a code of program:- 

public class table{
  public static void main(String[] args){
   
 int n = 2;
    int i = 1;
    System.out.println("The table of "+n+= ");
    while(i<=10)
      {
      int t = n * i;
      System.out.println(t);
      i++;
      }
  }
}

Download this example.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

2 comments so far (
post your own) View All Comments Latest 10 Comments:

give me the example of that..

Posted by joan on Monday, 09.22.08 @ 14:01pm | #80593

wonderfull

Posted by lorena on Monday, 02.4.08 @ 11:58am | #47176

Latest Searches:
DateFormate in java
uml classes
write a swing applicat
add row, delete row an
?б?а?а?б?а??б?а
org.gjt.mm.mysql.Drive
HWPF
delete files
fibonacci
make runing java progr
break��?��?�
how to write hql in da
jdk-6u1-windows-i586-p
jsp:forward tag
Servlet Example To Dis
Write a program that i
how to write hql in da
Applet tutorial
Struts1.1 example down
Photoshop Drawing Pixe
session scope-manually
Insert Data into Datab
java display applet me
Directory
generic
jboss portal lucene
Junit
Java swing show()
lookupdispatch
objective type
how to call pl/sql fro
the this key
Janino -- an Embedded
creating menus in jsp
concatenate java
servlet sessions
how to load jar file
login and verifying in
get windows directory
table model
Why Virtual Dedicated
HttpSessionActivationL
http get example
Uploading Employee Pro
MurachÑ?Ð?Ð?Ñ??Ñ?Ð????
jdbc html jsp
set colours Jtree
buffer
java set methods
examples of sql
connect SQL server in
FCKediter
Initialization
JSF richfaces for tree
converting calender to
Round robin
yield function in thre
getQueryParam
netbeans jsp
how to write hql in da
servlets programming
mysql blob
send multimessages fro
ajax
pthread.h
DOM parsers.
MurachÑ?Ð???Ñ?Ð??Ñ?Ð??
jdbc insert
Passing Parameters in
JDBC with Mysql in Ecl
jdbc mysql connection
how to read xml file i
lucene in windows
capturing
html textarea
HTML Images Text Over
json lib/componen...]=
joining queries in SQ
Spring sample
java jtable
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.