Buscar

Saturday, 30 April 2011

// write a program which counts the length of the string.

CODE



import java.lang.*;

import java.io.*;
public class StringLength{
public static void main(String[] args) throws IOException{
System.out.println("String lenght example!");
BufferedReader bf = new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Please enter string:");
String str = bf.readLine();
int len = str.length();
System.out.println("String lenght : " + len);
}
}


OUTPUT DISPLAY



0 comments:

¿Te animas a decir algo?

 
FOR GENIOUS | Copyright © 2011 Diseñado por: compartidisimo | Con la tecnología de: Blogger