Hi,
I guess this one should help:
Code:
String test = new String("teststring");
String test2 = new String("test");
String test3 = new String("timemachine32");
String test4 = new String("abc");
if(test.length()>4)
{
System.out.println("test output: " + test.substring(test.length()-4));
}
Compare the string lengths to get their individual outputs. I did for
variable test. Try for test2 and any other of your choice.
test4 and test2 should not yield anything when tested in if.