Q. What is event in java?
Ans: Event is the communication between objects which changes the state of the object .For example: suppose you are in a class room and your faulty asks you to write something.Here faculty raised and event "write" and you catch and handle that event and change your state and started writing.Let us take another exmple:
Suppose you have Form and you pressed the button of the form,because of that the button changed its state from "disabled" to "enable".So the button raised an event which is handled by the method of form and the form changes its state.
No comments:
Post a Comment