java - primitive vs managed types on android - which one should i use in my app -


im trying port iphone app android. new java , android environment

i see different code samples on internet, use int , boolean use integer , boolean

i wanted know pros , cons of both , best way forward?

since primitive types saved on stack , no garbage collection happens on them, better choice far performance goes?

what real benefit of primitive v/s managed types? , suggested approach?

in app performance crucial...

thanks in advance

the wrapper types used when need object. example : able store integers in collection (like list or set), need transform primitive object (integer).

the wrapper have feature on primitive types : nullable.so, example, represent integer value stored in nullable column of database table, you'll use integer rather int able store null value.

basicaly, advice : use primitive types except whan can't (for example, 1 of reasons explained).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -