3/16/2014 - 5:55 PM


package project001;

public class project001 {
	public static void main(String arg[]){
	//Java implements Strings as objects.

	//String is a part of java.lang

	//Strings are immutable (means you can't change String later, you need to create new one)

	//How to define strings in java?

	String myString01 = "This is my string in single line";

	//String support only one operation and that is + operation. Like this

	String firstString= "\"This ";

	String secondString= "is ";

	String thirdString= "my ";

	String fourthString= "string\" ";

	String myString02=firstString + secondString + thirdString + fourthString;
	System.out.println("This is combined line " + myString02);