Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sybex book: p.282. Funny code :))  RSS feed

 
Mikalai Zaikin
Ranch Hand
Posts: 3403
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Ranchers.
What do you think this code do ?

The answer (!!!):
----------
In this example, the calling thread begins by requesting an icon defined within the web.xml file.
----------
Another new thing I learn: it's possible to pass almost any java object, not just strings as a servlet parameter. That's great feature from book authors...
[ October 30, 2002: Message edited by: Mikalai Zaikin ]
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well isn't that interesting I am sure that you would get a ClassCastException, but hey, that is just me!
There seem to be some BIG holes in this book!
 
friso jonge
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
again, i agree
 
Maha Annadurai
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You wouldn't get a run time ClassCastException. This code would't even compile.!
-Maha
[ November 26, 2002: Message edited by: Maha Annadurai ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!