Is there a way to get the address of a Java object?
Where does the question arise ?: First, I read the properties file, and all the data from the file was placed in a table. The properties file may be updated. So, I want to listen to this file. I am listening to an object using PropertyChangeSupport and PropertyChangeListener.
updatedStatus = new basit.data.MyString(); updatedStatus.addPropertyChangeListener(new java.beans.PropertyChangeListener() { //After changes "i", we inform the table model about new value public void propertyChange(PropertyChangeEvent evt) { Object objec=evt.getNewValue(); tableModel.setValueAt(objec.toString(), 0, 5); } });
If updateStatus changes, I am updating the table. The MyString class has a private string "Value". I want to listen to the properties file. Thus, it should make updatedStatus.value and String of the properties file equal at the same address. If I can do this, so I don’t need to listen to the properties file.
updatedStatus.setValue(resourceMap.getString("HDI.Device.1.Name"));
I tried to use StringBuffer, but I could not achieve this. So I asked a question.
java string stringbuffer
Iguramu
source share