Java Question How does my Java class to be built, if I have a list as a member?

Amalkotey

Active Member
Licensed User
Longtime User
Hello Java professionals,

how do I build my java class, if I have a functionality such as in

B4X:
Dim Mail As Email
[B]Mail.To.Add("user@example.com") <---< I do not get back this functionality[/B]

I can not imagine what you'll use inner classes. I am now for three weeks on this problem. I 'm already on despair. It would be nice of you if you could give in with little example. Many thanks for your help in advance.

best regard
Amalkotey
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Here is the relevant part from the Email object:
B4X:
public static class Email {
      public String Subject = "";
      public String Body = "";
      public anywheresoftware.b4a.objects.collections.List To = new anywheresoftware.b4a.objects.collections.List();
      public anywheresoftware.b4a.objects.collections.List CC = new anywheresoftware.b4a.objects.collections.List();
      public anywheresoftware.b4a.objects.collections.List BCC = new anywheresoftware.b4a.objects.collections.List();
      public anywheresoftware.b4a.objects.collections.List Attachments = new anywheresoftware.b4a.objects.collections.List();
      public Email() {
         To.Initialize();
         CC.Initialize();
         BCC.Initialize();
         Attachments.Initialize();
      }
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…