This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

which methods to study...

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I had posted this very question long time ago, but I wasn't clear with my
question. Well, I wanted to know which methods I ought to study from the
String, StringBuffer, Thread, and the Collections Framework. Sun is very clear about which methods I need to know from the Math and Wrapper classes but does not state much for the classes String, StringBuffer, and Thread. There are a lot of methods from these classes which I have never used. Which methods should I study from the three classes I mentioned and the collections framework?

Thanks.
 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Which methods should I study from the three classes I mentioned and the collections framework?"

The easy answer is all of them.

Here's the practical answer that will cover most of the questions:

For collections know how each collection is used and which is best for a given situation.

For StringBuffer, know that this class does not ovveride equals() and that class methods that alter this StringBuffer and return StringBuffer return and alter itself.

For String, know that equals() lexicographically compares two strings and that class methods that seem to change strings leave the invoking String unchanged and return a new String; in short, internalize that Strings are immutable.

(To illustrate an important difference between the StringBuffer and String methods, understand what is going on with, e.g., StringBuffer.append(StringBuffer sb) and String.concat(String str).)
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic