Which is the most efficient way of creating a string object in java? String s="helo";
or String s=new String("helo");
in terms of memory usage?
Thanks in advance...
fardoonmuhafiz -11 Light Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
verruckt24 438 Posting Shark
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
fardoonmuhafiz -11 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.