|
-
August 14th, 1999, 10:48 PM
#1
Strings
Q.1
public class Quest{
public static void main(String[] arg){
String s1 ="abc";
String s2 ="def";
String s3 =s1.concat(s2.toUpperCase());
system.out.println(s1+s2+s3);
}
}
Ans. abcdefabcDEF - I got this answer and it contradicts with the concept that String Objects are immutable.
How does it work?
Thanks,
Deepa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|