The javadoc contains the following for Class's getClassLoader() method: "Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader."
Is the bootstrap classloader used for Strings? or maybe something to do with bootstrapping for the main method? -----Original Message----- From: RAMESH VISHNUVARDHAN [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 3:48 PM To: JDJList Subject: [jdjlist] Classloader is null Hi all, I am executing the following code: public class Test{ public static void main(String args[]) { System.out.println(new String().getClass().getClassLoader()); } } I am getting the output as null. How can be a class without classloader? Can anybody explain why am i getting null. Regards, Vishnu To change your membership options, refer to: http://www.sys-con.com/java/list.cfm This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
