class string1
{
public static void main(String args[])
{
String s=new String("ramesh kumar");
String s1="ramesh";
String s5="ramesh";
String s2=new String("RAMESH");
String s3=new String("ramesh");
String s4=new String("ramesh");
System.out.println(s);
System.out.println(s.length());
System.out.println(s.charAt(0));
System.out.println(s.charAt(1));
System.out.println(s.toUpperCase());
System.out.println(s.toLowerCase());
System.out.println(s.startsWith("r"));
System.out.println(s.endsWith("r"));
System.out.println(s1.equals(s2));
System.out.println(s1.equalsIgnoreCase(s2));
System.out.println(s1);
System.out.println(s1.length());
System.out.println(s1.substring(2));
System.out.println(s1+" "+s1);
if(s1==s5)
{
System.out.println("true");
}
else
{
System.out.println("false");
}
}
}
Subscribe to:
Post Comments (Atom)
MY HIT COUNTER
Blog Archive
-
▼
2009
(38)
-
▼
November
(27)
- few programs on bank project
- customer identification number
- bank programs
- min balance program in oracle
- cards balance
- real time programs in bank project
- real time registration example
- Creation of tables in oracle
- practice quries
- quries
- reverse number
- throws exception
- throws exception
- divide by zero
- array index
- length of a string name
- no parameters to string
- print two parameters
- abstract class in core java
- inside area of rectangle
- area of rectangle
- three string parameters
- class b extends a
- incremeting numbers
- sum of three parameters
- box program
- strings
-
▼
November
(27)
Custom Search
No comments:
Post a Comment