This shows you the differences between two versions of the page.
java:interface_modification [2017/02/16 14:31] gthanos created |
java:interface_modification [2018/03/20 21:24] (current) gthanos [Στατικές μέθοδοι] |
||
---|---|---|---|
Line 123: | Line 123: | ||
String str2; | String str2; | ||
if( str.length() >= index-1 ) { | if( str.length() >= index-1 ) { | ||
- | str2 = new String(""); | + | str2 = str.substring(index+1); |
} | } | ||
else { | else { | ||
- | str2 = str.substring(index+1); | + | str2 = new String(""); |
} | } | ||
return str1+str2; | return str1+str2; |