byte [ ] bys = { 97 , 98 , 99 } ;
String s = new String ( bys) ;
System. out. println ( s) ;
char [ ] cha = { 'H' , 'e' , 'l' , 'l' , 'o' } ;
String s1 = new String ( cha) ;
System. out. println ( s1) ;
String s2 = "abc" ;
String s2 = "abc" ;
String s3 = "ABC" ;
boolean eq = s2. equals ( s3) ;
System. out. println ( eq) ;
boolean eq1 = s2. equalsIgnoreCase ( s3) ;
System. out. println ( eq1) ;
boolean b = s2. startsWith ( "a" ) ;
System. out. println ( b) ;
boolean b1 = s2. endsWith ( "c" ) ;
System. out. println ( b1) ;
boolean em = s2. isEmpty ( ) ;
System. out. println ( em) ;
int length = s2. length ( ) ;
System. out. println ( length) ;
char c = s2. charAt ( 1 ) ;
System. out. println ( c) ;
int c1 = s2. indexOf ( "c" ) ;
System. out. println ( c1) ;
String s4 = "abcabc" ;
int m1 = s4. lastIndexOf ( "b" ) ;
System. out. println ( m1) ;
String sub1 = s4. substring ( 2 ) ;
System. out. println ( sub1) ;
String sub2 = s4. substring ( 2 , 4 ) ;
System. out. println ( sub2) ;
byte [ ] by = s2. getBytes ( ) ;
for ( int i = 0 ; i < by. length; i++ ) {
System. out. println ( by[ i] ) ;
}
char [ ] chars = s2. toCharArray ( ) ;
for ( int i = 0 ; i < chars. length; i++ ) {
System. out. println ( chars[ i] ) ;
}
int a = 123 ;
String s5 = String. valueOf ( a) ;
System. out. println ( s5) ;
String re = s2. replace ( "b" , "d" ) ;
System. out. println ( re) ;
String[ ] m2 = s2. split ( " " ) ;
for ( int i = 0 ; i < m2. length; i++ ) {
System. out. println ( m2[ i] ) ;
}
String sb = " a b c " ;
String tri = sb. trim ( ) ;
System. out. println ( tri) ;