It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of [url=http://java.sun.com/javase/reference/api.jsp]online documentation[/url] that you can even [url=http://java.sun.com/docs/index.html]download[/url] for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.
[url=http://java.sun.com/javase/reference/api.jsp]Java?API Specifications[/url]
[url=http://java.sun.com/javase/6/docs/api/]Java?SE 6 JDK Javadocs[/url]
Also, your boolean expression is unnecessarily complicated:
// if((b = sbuf.startsWith(s2)) == true)
if (s.startsWith(s2))
~
> @java_newbe:
> This forum is for questions and discussions about
> Java Generics only. Please match your posts to the
> forum subject in the future. If you don't know which
> forum to post to, Use the New to Java forum.
to clarify, Generics is a feature present from java 1.5 onwards. this is a forum about them, not a forum for generic questions. as chuck said, post in the right forum - you'll get a better response