saif Active member
| Subject: Program to explain some String functions Wed Feb 24, 2010 8:13 am | |
| import java.io.*; class strfun { public static void main(String args[])throws IOException { String s="ABCDEFAA"; System.out.println(s.replace('A','B')); System.out.println(s.replace("AB","B")); System.out.println(s.replace("A","")); BufferedReader obj =new BufferedReader(new InputStreamReader(System.in)); char c=(char)(obj.read()); int a=10; String x=Integer.toString(a); System.out.println(x); x=Character.toString(c); System.out.println(x); } }
//Best Of luck To All |
|