Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
String predefined method doubt???
Joined: Aug 01, 2009
Dec 02, 2009 01:48:06
public class SB
public static void main(
s1.insert(0,"Hello from Java");
s2 is displaying nothing not even null as it is not even referecing to any object ,why is this happening???
Joined: Jan 12, 2009
Dec 02, 2009 03:58:50
Answer seems to be posted here:
Please note OP in both the cases
My Website: [
] Cool your mind:[
] My Sally:[
Joined: Oct 27, 2005
Dec 02, 2009 06:47:59
This problem is slightly different.
Vishal, what does s2 contain when you try to add it to itself? Also, please
use code tags
in the future.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
Joined: Oct 13, 2005
Dec 02, 2009 07:14:43
And also, your
doesn't quite tell us what the question is about.
, not String, please.
By the way:
is usually more efficient in that sort of circumstances.
It is sorta covered in the
JavaRanch Style Guide
subject: String predefined method doubt???
Check the output!!
Can this be a case of deadlock ?And how to determine it output ?
== and equals
StringBuffer var as an argument
Inner Thread Classes
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013