public class examp2
{
public static void main(
String[] args)
{
String x="Java";
String x2;
x=x.concat("Rules");
for(int i=0;i<x.length();i++)
{
x=x.substring(i);
x2=x;
System.out.println(x2);
}
}
}
works different then the following one
......
.......
for(;
{
x2=x.substring(i);
System.out.println(x2);
}
.....
.....
how the references are assigned please explain
thanks