Link Details

Link 85380 thumbnail
User 214988 avatar

By puredanger
via codetojoy.blogspot.com
Published: Jun 05 2008 / 12:54

Consider this problem: Write a program that takes a fully qualified Java class name as input. The program should call its no-arg constructor and print out the object's toString method to prove the object was constructed. You might think "I could do that with reflection, but I can't be bothered looking it up right now".
  • 13
  • 0
  • 1271
  • 326

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.