Check out example codes for "java observable". It will help you in understanding the concepts better.

Code Example 1

setChanged();
notifyObservers(object_that_u_want_to_send_to_Observer);

Learn ReactJs, React Native from akashmittal.com