-2

I have this code in ADT Android

private Titular [] datos = new Titular[] {};

How do I add another element from TextEdit ?

Trying
  • 14,004
  • 9
  • 70
  • 110

2 Answers2

1

In Java, you can't change the size of an Array after it has been instantiated. You will have to collect your data in another collection type. Check out this answer for example.

Community
  • 1
  • 1
nana
  • 4,426
  • 1
  • 34
  • 48
0

use java.util.arraylist instead of using object array too brief

Ismail Sahin
  • 2,640
  • 5
  • 31
  • 58