A struct would /be/ an object, thus its overhead would be the same as for
a class, because in Java, a class *is* a struct, or to put it another way,
there is no such thing as a "struct", and if there were, it would be an
object. How do you think you can create an object for free by calling it
On Thursday, November 24, 2011 4:59:55 AM UTC-8, Mark Murphy (a Commons
Guy) wrote:
>
> On Thu, Nov 24, 2011 at 7:56 AM, Aitor Mendaza Ormaza
> wrote:
> > I want to make something similar to a struct in C/C++, to represent a
> > collection of structured data.
>
> In Java, this is called a "clas
On Thu, Nov 24, 2011 at 8:54 AM, Aitor Mendaza Ormaza
wrote:
> For what is worth, I don't choose not to believe Mr. Bloch, I was just
> wondering if in Android were better choices for classes as structs, as I
> know my knowledge of both Java and Android is limited.
Android doesn't add anything to
On Thu, Nov 24, 2011 at 2:18 PM, Mark Murphy wrote:
> 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
On Thu, Nov 24, 2011 at 8:09 AM, Aitor Mendaza Ormaza
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.htm
On Thu, Nov 24, 2011 at 1:59 PM, Mark Murphy wrote:
> On Thu, Nov 24, 2011 at 7:56 AM, Aitor Mendaza Ormaza
> wrote:
> > I want to make something similar to a struct in C/C++, to represent a
> > collection of structured data.
>
> In Java, this is called a "class".
>
> Really? I had no idea about
On Thu, Nov 24, 2011 at 7:56 AM, Aitor Mendaza Ormaza
wrote:
> I want to make something similar to a struct in C/C++, to represent a
> collection of structured data.
In Java, this is called a "class".
> Is there a more efficient way to do this in android? Something like structs
> :)
No.
--
Ma
Hi to everyone:
I want to make something similar to a struct in C/C++, to represent a
collection of structured data.
I first though of making objects with properties, but this might be a
little inefficient (creating objects just to store data).
Is there a more efficient way to do this in android?
8 matches
Mail list logo