Seetharaman Venkatasamy wrote:
might be this line, missing " around hi .
class Hello<T> is having a constructor which takes an argument of type T. This particular case you are creating an instance of Hello<
String>, so you can pass a String argument to the constructor. For example, you can create
which will assign
and the hello.toString() will print the hello.t, which is "hi"
SCJP6, SCWCD5, OCP-JBCD5, OCE-JWSD6 OCE-JPAD6 , OCM-JEA5 1,OCM-JEA5 2,3,OCJP8 - Brainbench certifications: J2EE, Java2, Java2-NonGUI, JSP, SQL2000 Admin, SQL2000 Programming , Brainbench certified Java Programmer, Computer Programmer, Web Developer, Database Administrator