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
Post a Comment