intermediate/IndexOfExample

From ggc

Jump to: navigation, search

01 package intermediate;
02 
03 import wiki.Wiki;
04 
05 /**
06  * All about my application.
07  @author My Name Here
08  */
09 public class IndexOfExample
10 {
11   public static void main(String[] args)
12   {
13     String x="Hello Jam!";
14     String y="Jam";
15     Wiki.out.println("index of '"+y+"' in '"+x+"' is "+x.indexOf(y));
16     y="Jelly";
17     Wiki.out.println("index of '"+y+"' in '"+x+"' is "+x.indexOf(y));
18 
19     /**example of using isOkayForChildren*/
20     /*Censor censor=new Censor();
21     String[] bad={"kill", "strip"};
22     String text="The adult dog was sick.";
23     if(censor.isOkayForChilder(bad, text))
24     {
25       Wiki.out.println(text);
26   }
27     else
28     {
29       Wiki.out.prinltn("censored");
30   }*/
31   }
32 }


Download/View intermediate/IndexOfExample.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter