Guest User

Untitled

a guest
Jul 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. import java.io.*;
  2.  
  3. /**replace "ICS201" with "ICS301" from statement “This is ICS2O1 Class”."
  4.   * @author Peter Lee
  5.   * @version 1.0 April 4th, 2012
  6.   */
  7.  
  8. public class Replace
  9. {
  10.  
  11.   public static void main (String[] args) throws IOException
  12.   {
  13.     InputStreamReader inStream=new InputStreamReader (System.in);
  14.     BufferedReader stdin=new BufferedReader (inStream);
  15.    
  16.    
  17.     String data="Hello All";
  18.  
  19.  
  20.    
  21.     data=data.replaceAll("Hello","Bye");
  22.     System.out.println(data);
  23.   }
  24. }
Add Comment
Please, Sign In to add comment