Home Discussion Discuss: do-while Loop in Java

  • confused?jacinth August 31, 2011 at 7:00 PM

    what if in condition on while im using string above what should be the format? like these package Passes; import java.util.Scanner; public class Sc { public static void main(String[]args){ Scanner jaz = new Scanner(System.in); do{ System.out.println("press c"); String c = jaz.next(); System.out.println("input age: "); int age = jaz.nextInt(); if(age < 60){ System.out.println("young!"); }else System.out.println("guwang!"); }while (String.e) }

  • javawinnie September 21, 2011 at 7:32 PM

    i need to get help about java programing

  • thrilledgcebile nhleko November 17, 2011 at 1:30 PM

    i like your examples.

  • java programmingmurugan January 25, 2012 at 2:24 PM

    simple program exercise very helpful java at j2ee kindly help me..

  • please help me , To unnderstantd this programshamim February 6, 2012 at 11:10 AM

    I can not understand this program public class DoWhile{ public static void main(String[] args){ int n = 12345; int t,r = 0; System.out.println("The original number : " + n); do{ t = n % 10; r = r * 10 + t; n = n / 10; }while (n > 0); System.out.println("The reverse number : " + r); }

  • loop with while_for_do whileNoor Suhadah February 7, 2012 at 6:24 PM

    1. for 2. while 3. do while display the following for loop 1 12 123 1234

  • srenrique demon April 23, 2012 at 7:14 AM

    its a nice program

  • doubtBalaji Sankar May 28, 2012 at 11:34 AM

    Please provide a step by step process of how the program s working

  • OOPrjhoi July 30, 2012 at 7:49 AM

    can you please add more examples?

  • java aslima asim ali September 13, 2012 at 2:05 PM

    actualy it is not a comment:i want to ask how to make a do while loop in java program?can you help me pls :)

  • core javaAbhishek gautam June 25, 2013 at 8:30 PM

    nested do while loop or do while A AB ABH ABHI ABHIS what is the source code

  • javaj.sumithvictor July 26, 2013 at 8:15 PM

    its very nice to student

  • JavaLewis October 4, 2013 at 12:48 AM

    Question print multiples of 37 below 100 using do while loop

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

loop
loop  i want to write my name(inder) through loop in java using star 

Java Beginners

for loop
it is infinite loop. Java provides several loop structures for iteration. Those are for, while, do...while etc. Let us discuss "for" loop. "for" loop provides...for loop  what is for loop   Loops are used for iteration 

Java Beginners

for loop
for loop  hai, I need to write java program to print numbers in "X" format 

Java Interview Questions

Java for loop
Java for loop  Can a for statement loop indefinitely 

Java Beginners

for loop in java
for loop in java  54321 4321 321 21 1 using for loop or nested 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 using for loop or nested... 8 9 6 7 8 9 10 all for loop code plz friends guide me 

Java Beginners

for loop in java
for loop in java  54321 4321 321 21 1 using for loop or nested 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 using for loop or nested... 8 9 6 7 8 9 10 all for loop code plz friends guide me 

Java Beginners

for loop in java
for loop in java  54321 4321 321 21 1 using for loop or nested 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 using for loop or nested... 8 9 6 7 8 9 10 all for loop code plz friends guide me 

Java Beginners

for loop in java
for loop in java  54321 4321 321 21 1 using for loop or nested 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 using for loop or nested... 8 9 6 7 8 9 10 all for loop code plz friends guide me 

Java Beginners

for loop in java
for loop in java  54321 4321 321 21 1 using for loop or nested 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 using for loop or nested... 8 9 6 7 8 9 10 all for loop code plz friends guide me 

Adobe Flex

For..in loop
For..in loop         In this tutorial we will study for..in loop which is similar to for each loop of C#, Java and other popular languages, in this example 

Java Beginners

for loop in java
for loop in java  1 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 3 4 5 4 5 6 7 5 6 7 8 9 6 7 8 9 10 using for loop in java   Java Number Pattern 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 public class PatternExample{ public static void main 

Java Beginners

For loop java
For loop java  1 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 3 4 5 4 5 6 7 5 6 7 8 9 6 7 8 9 10 

Struts Questions

For Loop - Struts
For Loop  Hi, How to use for loop in Struts2. I don't want use Java code in the JSP. In my application I am using List is sending to jsp.... How to use the For loop in JSP. Thanks, Rajesh.  Hi Rajesh, i 

Java Beginners

Java Loop - Java Beginners
Java Loop   WAP to print d following pattern wid d help of any loop(for or while or do-while 

PHP Questions

For Loop/PHP
12345. How would you write this as a loop? Would I need to use the for loop or do/while loop?   PHP Factorial Example: <?php $n = 5; $i = 1; $f...For Loop/PHP  Write a class called math. It is to have one property 

Java Beginners

Java Loop 2 - Java Beginners
Java Loop 2  WAP to print d following patter wid d help of ne loop possible 

Java Beginners

loop, control structures
loop, control structures  a java program to print 

Java Beginners

loop, control statements
loop, control statements  a java program to print 

Java Beginners

While loop Statement.
While loop Statement.   How to Print Table In java using While Loop 

Java Tips and Examples

For Loop in Java
For Loop in Java - Java For Loop Examples & Syntax       The for loop is the type of  looping construct. It also works as while loop construct but it provide the initialization 

Java Beginners

While loop - Java Beginners
While loop  Given a number, write a program using while loop...(br.readLine()); int n=num; int rem=0; int rev=0; while(n!=0...; } System.out.println("Reverse Number : " + rev); } } For more information on Java 

Java Beginners

LOOP PROGRAM - Java Beginners
LOOP PROGRAM  Hi all, Someone please help this code. I need a Java program that uses looping to toss a coin over and over until it comes up head...; } public static void main (String[] args) { do{ flip 

Java Beginners

loop problem - Java Beginners
loop problem  I trying to write a program which prints out even numbers, I've got that part, however, I need to only have 5 numbers per line. ex: 2 4 6 8 10 12 14 16 18 20 I tried using a counter, but I'm missing 

Java Beginners

Nested Loop - Java Beginners
Nested Loop  Hi, Can anyone tell me example of Nested loop in Java? Thanks   Hi friend,public class NestedExample{ public static void main(String[] args){ /** Print Pattern I */ System.out.println(" 

JSP-Tutorials

FOR Loop In JSP
are used e.g. while loop, do while loop, for loop. In programming these loops... in Java i.e. syntax of the for loop is same as its syntax defined for using in core Java. Syntax of for loop for(INITIALIZATION; CONDITION; INCREEMENT 

Java Magazine Questions

loop problem - Java Magazine
loop problem  import java.util.Scanner; class mychoice{ public...); int your_choice = 0; do{ //display the main menu..."); System.out.print("enter your choice: "); your_choice = choice.nextInt(); }while 

JavaScript Questions

javascript loop examples
javascript loop examples  While running a javascript loop function i am getting an error ..can any one post an example of writing loops in javascript?   Looping In Java Script 

Java Beginners

Learning the for loop - Java Beginners
Learning the for loop  Good evening gentlmen! I'm new to Java programming and I would like to learn how I can find if the Theorem of Thales (a*a + b*b = c*c),exists in integers between 1-500.I want to find the size of every 

Java Tips and Examples

'for' Loop
Java Notes'for' Loop Purpose The for statement is similar.... The loop isn't executed if the boolean expression is false (the same as the while... of squares Here is a loop written as both a while loop and a for loop. First 

Java Beginners

for loop - Java Beginners
("Series="+num); do{ num=num/2; System.out.print(","+num); }while(num 

DMCA.com