Buscar

Saturday, 30 April 2011

// write a program in java which finds the index of a particular character the string.


CODE

import java.io.*;
import java.awt.*;
public class StringIndex
{
public static void main(String args[])
{
String s = "Welcome to BCA";
System.out.println(s);
System.out.println("INDEX OF 'B' IN THE STRING IS=" + s.indexOf("BCA"));
}


OUTPUT DISPLAY







0 comments:

¿Te animas a decir algo?

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