Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

string programs in java

class basicString{
  public static void main( String [] args){
    String x = "Hello";
    String y = " stranger";
    String z = "";
    z = z + y + z;
    System.out.println(z);/* This will print out "Hello Stranger".How?
    Because I Assigned an empty variable and add the other two variables( x,y) into z.*/
  }
}
 
PREVIOUS NEXT
Tagged: #string #programs #java
ADD COMMENT
Topic
Name
4+9 =