Bookmark Topic Watch Topic
  • New Topic

HttpSessionBindingListener

 
Purusottam Mohanty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
An object X implement's a HttpSessionBindingListener.
The valueBound method is to print "B" and the valueUnbound method is to
print "U".

The code to be executed is :

session.setAttribute("A", new X());
session.setAttribute("A", new X());
session.removeAttribute("A");

What should be output:

1.BBU 2.BUBU or 3.BBUU

and why ?

all responses are appreciated.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65663
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!