Results 1 to 1 of 1
- 12-14-2009, 03:05 AM #1Member
- Join Date
- Sep 2009
- Rep Power
topic is for errors and questions i get throughout my work
Hello. I'm working on an app and im using the app in this link as my starting point. I'm trying to understand some things and using what I see as reference to my own work.
So to start with, here are some questions!
Look for this line RecordStore.deleteRecordStore(name);
The comment says that any previous record store wiht that name is to be deleted. If it fails then we ignore it. I assume it means if that recordstore name isnt found then just catch the exception without any msgs and move on.
My question is this: WHY? why r they deleting it?
Also, look for Don't allow this class to be instantiated
He's explaining what the private does i believe so that we can't create objects of it because i believe when you create an object of a class, it goes to the constructor and initializes it there. But why did he make it private in the first place? All this class does is create a RecordStore. The address book. The object that holds all the data. For security reasons? Or?
And why does he include the boolean values? Why is the create method boolean? Here's a rookie question.
Line 136 take you to Line 352. In the midlet's construtor he calls a method in a different class by type class.method(paramenters). At line 352 you see that this method returns boolean. He even says it in his comments. False if the record wasnt created. Well why? What happens if i removed the boolean and return statements. Whats the significance? I mean, here's the rookie part .. hope not, line 136 should have Boolvar = CreateAddress.recordstore(parameters); If the method returns a boolean then it should b saved in a boolean variable. But he doesnt do that here. So once again, whts the significance of having all a boolean return type if ur not going to do anything with it.
- By firstname.lastname@example.org in forum Forum LobbyReplies: 0Last Post: 11-26-2009, 10:50 AM
- By DrMath in forum New To JavaReplies: 1Last Post: 09-29-2009, 08:07 PM
- By tlau3128 in forum New To JavaReplies: 3Last Post: 03-08-2009, 02:51 AM
- By pankaj_salwan in forum Advanced JavaReplies: 0Last Post: 10-06-2008, 10:59 AM
- By success21061985 in forum NetBeansReplies: 0Last Post: 08-21-2008, 01:43 PM