import java.io.*;
class ssvdowhile
{
public static void main(String arg[]) throws IOException
{
String t;
int c,n;
c=0;
DataInputStream dr = new DataInputStream(System.in);
System.out.print("Enter a whole Number : ");
t = dr.readLine();
n = Integer.parseInt(t);
do
{
n = n/10;
c = c+1;
}while(n != 0);
System.out.println("\nThe given Number is a " + c + " Digit Number");
}
}Java
Java - do while Statement

Written by
View ProfileSenthilvelan Sambamoorthy
Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.
