I want to add an object to an ArrayList, but each time I add a new object to an ArrayList with 3 attributes: objt(name, address, contact)
ArrayList
objt(name, address, contact)
You have to use new operator here to instantiate. For example:
Contacts.add(new Data(name, address, contact));