Amadeus Interview Question

When a subclass extends a super class to provide additional or more specific functionality. When a class defines a method using the same name, return type, and arguments as a method in its super class, the method in the class overrides the method in the super class. Methods may be overloaded to be more public, not more private. When a class defines two or more methods using the same name, but with different parameter declarations. Method overloading is one of the ways that Java implements polymorphism. 11. Which description best describes an abstract class? An abstract class contains no implementation whatsoever. All methods are implicitly public and cannot be made protected or private. An abstract class cannot be instantiated. An abstract class may contain method implementations. A subclass of an abstract class can only be instantiated if it proves implementations for all abstract methods in the super class. An abstract class is a static member of a containing class. Such a class is not associated with any instance of the containing class, but does have access to all the static members of the containing class. 12. What type of copy does the default java.lang.Object.clone() method perform? Shallow copy: primitive types and references are copied Deep copy: objects are copied recursively There is no default implementation for clone() 13. Which design pattern is used by the JScrollPane implementation? 14. throw and Throws - for each statement below, enter the modifier it best describes? A modifier of a method signature (Throw / Throws) A statement that causes an exception to be initiated (Throw / Throws) Designates that exceptions may come out of the method (Throw / Throws) It takes the Exception object to be thrown as argument (Throw / Throws) Used when the method throws an exception itself (Throw / Throws) Required if the method fails to provide handling for exceptions that a method it calls may throw. (Throw / Throws) 15. Which method has to be implemented in a serializable singleton to guarantee that the singleton contract is not broken upon de-serialization, ie that we have only one instance of the object? 16. What is the default layout of a javax.swing.JPanel? 17. Which thread runs all the AWT/swing event handling code? 18. Code associated with this keyword is always executed. It is one of three keywords used in Java's exception handling mechanism. It is generally used to clean up and release resources. To what keyword do the preceding statements refer? 19. What are the three main top-level containers in swing? 20. Which method from the Object class needs to be overridden every-time the java.lang.Object.equals(Object) method is overridden? That method has the following signature public int f(), and as part of its contract, should return the same integer for equal objects. It is used by collections based on hashes. public int ()