It ought to be fairly intuitive that a component ought to be able to have multiple listeners. After all, a text field might want to respond to both the mouse and keyboard
1) b=m;
3) d =i;
You can assign up the inheritance tree from a child to a parent but not the other way without an explicit casting. A boolean can only ever be assigned a boolean value.
2) You can obtain a mutually exclusive lock on any object
3) A thread can obtain a mutually exclusive lock on an object by calling a synchronized method on that object.
4) Thread scheduling algorithms are platform dependent
Yes that says dependent and not independent.
2) Ask for a re-design of the hierarchy with changing the Operating System to a field rather than Class type
This question is about the requirement to understand the difference between the "is-a" and the "has-a" relationship. Where a class is inherited you have to ask if it represents the "is-a" relationship. As the difference between the root and the two children are the operating system you need to ask are Linux and Windows types of computers.The answer is no, they are both types of Operating Systems. So option two represents the best of the options. You might consider having operating system as an interface instead but that is another story.
1) An inner class may be defined as static
4) An inner class may extend another class
|
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容 本站提醒:不要进行人身攻击。谢谢配合。 |