Hi,
I have been roaming and combing various websites and forums, to find a way to make a struct in java. Now the reason I wanted a struct was, I remember reading that you really want to minimise the amount of classes in your midlet. I think it had to do with saving memory.
I would just like to know if tis is a valid comment, and if so, how would I go about making a struct in java without creating a class.
The struct I want is quite basic, it s an equation with 2 numbers, an arithmatic operator, and an answer. And I want to creat an array list of these.
"structs" in midlets
Page 1 of 11 Replies - 337 Views - Last Post: 09 June 2011 - 02:36 PM
Replies To: "structs" in midlets
#2
Re: "structs" in midlets
Posted 09 June 2011 - 02:36 PM
Moved to Mobile Development since this is a Java ME question.
There is no such thing as a struct in Java. That's a C/C++ thing. On the mobile platform, you don't want memory intensive operations. Using multiple classes isn't a big deal, but don't create a ton of objects if you can avoid it.
There is no such thing as a struct in Java. That's a C/C++ thing. On the mobile platform, you don't want memory intensive operations. Using multiple classes isn't a big deal, but don't create a ton of objects if you can avoid it.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote







|