DOWNLOAD

Get our toolbar!

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:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More