• Post Reply Bookmark Topic Watch Topic
  • New Topic

Wrapper classes  RSS feed

 
Zohr Ridhan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int t=(Integer)list.get(1);


Where list is an ArrayList.

Why above statement is valid as Lhs is primitive data type and rhs is an object?
 
Liutauras Vilda
Sheriff
Posts: 4918
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zohr Ridhan wrote:is valid as Lhs is primitive data type and rhs is an object?
Hi Zohr,

It took me a few moments to figure out what did you mean by bolded ciphers keys. It could be extremely difficult to understand for the guys, whose english is not a native language (for example me). Better use Lhs - left hand side, rhs - right hand side.

About your question, I found two websites for you to have a look to clear this out:
1. Here you can find an answer < link
2. Oracle's tutorial < link
 
Zohr Ridhan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohk,I will keep that in mind for next time.By the way thanks for you help.
 
Liutauras Vilda
Sheriff
Posts: 4918
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zohr Ridhan wrote:Ohk,I will keep that in mind for next time.By the way thanks for you help.

No problem, I hope it helped. If you feel that not fully understood - ask, need to clear this up
 
Zohr Ridhan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No!it's crystal clear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!