append to a string java code example
Example 1: insert string in string java
String newString = originalString.substring(0, index + 1)
+ stringToBeInserted
+ originalString.substring(index + 1);
Example 2: append a character to string java
1. String otherString = "helen" + character;
2. otherString += character;
Example 3: append string perl
$name = checkbook';
$filename = '/tmp/' . $name . '.tmp'; -this line-
# $filename now contains "/tmp/checkbook.tmp"