java - What is the difference of the List declaration? -
this line reports methods of load load.getid():
list<load> dbrecs = dblist.getallloads(); whereas line reports incremental hex address
list dbrecs = dblist.getallloads(); log.d("load", dbrecs); now project can move along.
is first line posting correct because supplied correct structure list declaration of list<load>? plow forward want short definitive answer or specific doc link.
the first declaration employs generics. it's syntactic sugaring allows declare list of loads, , not other odd object, , have compiler prevent adding integers or strings there mistake. allows save hassle , load objects directly instead of having mess around casts.
if possible, using generics considered best practice.
Comments
Post a Comment