|
-
Sep 6th, 2010, 10:18 PM
#1
[RESOLVED] Values for Types
Hi,
Where can I find info on how to set types?
For example I know string and boolean but I don't know about Address, etc.
Code:
public final String FIRST_NAME = "";
public final String LAST_NAME = "";
public final Address ADDRESS = "";
public final String PHONE_NUMBER ="";
public final boolean FULL_TIME = false;
public final boolean CURRENT = false;
Thanks,
Nightwalker
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 7th, 2010, 10:43 AM
#2
Re: Values for Types
Is it your code or someone elses?
If it is your code, most IDEs have a way to "Go to Definition" for stuff like that. If it someone elses code, you may want to look into their documentation.
-
Sep 7th, 2010, 10:54 AM
#3
Re: Values for Types
public final Address ADDRESS = "";
You are assigning empty string to it ? 
I think the datatype Address is typed wrong instead of String.
It might be like this:
Code:
public final String FIRST_NAME = "";
public final String LAST_NAME = "";
public final String ADDRESS = "";
public final String PHONE_NUMBER ="";
public final boolean FULL_TIME = false;
public final boolean CURRENT = false;
You should check the complete code. Did you tried running it ?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 7th, 2010, 06:02 PM
#4
Re: Values for Types
 Originally Posted by kfcSmitty
Is it your code or someone elses?
If it is your code, most IDEs have a way to "Go to Definition" for stuff like that. If it someone elses code, you may want to look into their documentation.
It's part of an assignment I need to do for my beginner java class.
The comments above that block of code are:
//TODO create defaults for all instance variables
// Default values are:
// firstName -> Not set
// address -> null
// phoneNumber -> Not set
// fullTime -> false
// current -> false
I guessing that by null all I need to do this?
Code:
public final Address ADDRESS = null;
 Originally Posted by akhileshbc
You are assigning empty string to it ? 
Sorry, I put it like that while trying to figure out what value should be there. It is not a string but an address.
Last edited by Nightwalker83; Sep 7th, 2010 at 06:05 PM.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 7th, 2010, 08:37 PM
#5
Re: Values for Types
Yup... it can be initialized to either null or a new instance of Address.
public final Address ADDRESS = new Address();
If initialized to an instance, its either default constructor or one that requires parameters be passed.
-
Sep 8th, 2010, 08:10 PM
#6
Re: Values for Types
Do you know a website which explains all of the types and how to use them?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 8th, 2010, 08:12 PM
#7
Re: Values for Types
It's either a native type or an object, usage of object depends on how object is defined.
-
Sep 8th, 2010, 08:16 PM
#8
Re: Values for Types
 Originally Posted by leinad31
It's either a native type or an object, usage of object depends on how object is defined.
Sorry, I'm not referring to Address in my previous post but types in general.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 8th, 2010, 08:31 PM
#9
-
Sep 8th, 2010, 09:52 PM
#10
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|