On Thu, Nov 24, 2011 at 8:09 AM, Aitor Mendaza Ormaza
<[email protected]> wrote:
> I jut wanted to know if there was a way around of using class only for
> storing data, as it will not have any methods attached to it, and object
> handling can be expensive.

http://java.sun.com/developer/Books/shiftintojava/page1.html

"Upon first exposure to the Java programming language, some C
programmers believe that classes are too heavyweight to replace
structs under some circumstances, but this is not the case. Degenerate
classes consisting solely of data fields are nearly equivalent to C
structs in every respect."

If you choose not to believe Mr. Bloch, that is your decision.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to