• Post Reply Bookmark Topic Watch Topic
  • New Topic

WRAPPER CLASS

 
chintan ramavat
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers

i want to know parse xxx() in detail, to me it just assigning value to the declared primitive, the only difference between parse and value of() is that parse works on primitive and valueof() works on Object.


so can anybody tell me then what's the bottom line of having parse, we could have direct assignment.
 
Javier Sanchez Cerrillo
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think apart from a possible performance issue since autoboxing, there is no reason for both methods to exist.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!