• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt About setAttribute Method

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When i run above code it gives output as 111.
Now my doubt is that how i am able to set primitive int(myInt) value in setAttribute method at line 6 whenever it should be Object.
is method using autoboxing?

Thanks
 
Arvind Giri
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes! and you must be using jdk 1.5.

Am I right?
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i am using jdk 1.5.
 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Arvind how did you figure out that its jdk 1.5 ?
 
Karthikeyan Varadarajan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
auto boxing :roll: :roll: :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic