intermediate/StringOps

From ggc

Jump to: navigation, search

01 package intermediate;
02 
03 
04 /**
05  * All about my application.
06  @author My Name Here
07  */
08 public class StringOps
09 {
10   public static void main(String[] args)
11   {
12     String message="Hello World!";
13     System.out.println("the length of "+message+" is "+
14                        message.length());
15     System.out.println("from 1 to 6 excluding 6 is "+
16                        message.substring(16));
17     double x=1/3.0;
18     x++;
19     x--;
20     int m=84%3;
21     message+=x;//shorthand for message=message+x;
22     System.out.println(message);
23     System.out.println(m);
24   }
25 }


Download/View intermediate/StringOps.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