gymshoe wrote: > But in my main Activity, I do create a variable "me" of type Person2, > and "me" is supposed to be created with a field known as "Id" of type > StrRecord. So shouldn't "Id" be created at the same time as "me"? If > so, then I should be able to access "me.Id".
Not in Java. > Moreover, if I change the field "Id" of type StrRecord to be field > "Id" of type String, it works fine, even though I never created the > new string specifically... Because you're setting the String, not manipulating the contents of the String. Leastways, I'm assuming you mean you change it to: String foo; and later call: foo="bar"; It does not matter what foo was or wasn't -- at the time of the assignment, the prior contents of foo (if any) are replaced by the static string "bar". > Finally, If you are right, I don't see how I can call "new > StrRecord()" without creating a new variable which is different then > the "Id" field, and it is the "Id" field that I am trying to assign... StrRecord Id=new StrRecord(); -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: All titles, revisions, & ebook formats, just $35/year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

