Java Blog

 public class JAVA_053

    public static void main(String[] args)
       String Str=\"To be or not to be\";

       System.out.println(\"The Original String is : \" + Str);

       Str=Str.replace(\' \',\'%\');

       System.out.println(\"The Replaced String is : \" + Str);

       Str=\"             This is a String.   \";

       System.out.println(\"\\nThe Original String is : \" + Str);

       Str=Str.trim( );

       System.out.println(\"The Trimed String is : \" + Str);

    Related Post:
  1. Program to generate Fibonacci Series of a given number

  2. Corba program to encrypt the text that you want to send on the client side. The server side decrypts it after receiving. Append server time.

  3. Given a list of marks ranging form 0 to 100, write a program to compute and print the number of students marks

  4. Corba program to Write a Echo server and client with UDP server and client

  5. Program to find the number of and sum of all integers greater than 100 and less than 200 that are divisible by 7

  6. CORBA program for displaying the date and time of the server machine, client machine and the difference between these two date and time

  7. Program to show the use of Bitwise Operator (|) OR

  8. An applet program to draw circle in center of the canvas

  9. Program to declare and initialize Boolean variables and print them on the Standard Output Device

  10. An applet program that concatenates two string entered in TextField

  11. Develop a CORBA based application for addition of two complex numbers and displaying the result on client side

  12. Program to show the use of some Math Methods

  13. Program of binary search tree

  14. Program to declare, initialize and print an array of characters

  15. Program of UDP datagram

  16. An applet program to find maximum of three numbers using textField

  17. Program to ask question and accept answer up to 3 attempt and display right answer if it is wrong

  18. Program to show the use of the Continue Statement

  19. Program of concatenating and Buffering files

  20. Program to show an example of using initialization block to initialize the data members of a class

Didn't find what you were looking for? Find more on Program to show an example of modifying String objects