You can use the ____ modifier with methods when you don’t want the method to be overridden.

Question1. If a programming language does not support ____, the language isnot considered object-oriented.a. Syntaxb. Appletsc. Loopsd. polymorphism2. If you do not specify a package for a class, it is placed in an unnamed ____ package.a. System b. Language c. default d. general3. It is common to create an interface when you want a class to implement behavior from more than one parent.a. Trueb. False4. Java does not allow a class to inherit directly from two or moreparents.a. Trueb. False5. Usually, the subclass constructor only needs to initialize the ____that are specific to the subclass. a. objectsb. data fields c. methodsd. constructors6. When you use the method name with a child object, the parent’s version of the method is used.a. True b. False7. Which of the following is NOT true regarding abstract methods?a. Abstract methods must be implemented in child classes.b. Abstract methods have no body.c. Abstract methods use the abstract keyword in declarations. d. Abstract methods are inherited8. Which of the following statements will is based on the class Color?a. public class Red extends Color b. public Red class extends Color c. public Color class expands Redby their children.create a class named Red thatd. public extend Red class Color9. As you add new Components to a ____, they are positioned in sequence from left to right across each row.a. CardPane b. GridPane c. HBoxd. BorderPane10. By convention, a class diagram contains the ____ following each attribute.a. data field b. argument c. data type d. class11. While a class can inherit from multiple abstract superclasses, it implement only one interface.a. True b. False12. A BorderPane is arranged in north, south, east, west, and bottom positions.a. True b. False13. Abstract classes and interfaces are similar in that you cannot instantiate concrete objects from either one.a. True b. False14. A class design requires that a particular member variable must be accessible by any subclasses of this class, but otherwise not byclassesdone toa.b. c. d. e.which are not members of the same package. What should beachieve this?The variable should be marked public.The variable should be marked private.The variable should be marked protected.The variable should have no special access modifier. The variable should be marked private and an accessor method provided.15. A class member declared protected becomes member of subclass of which type?a. public memberb. private member c. protected member d. static member16. A component can be made available or unavailable by passing true or false to the ____ method.a. getSource() b. setEnabled()c. setSelected() d. setBounds()17. A instance of a subclass is also an instance of its superclass. a. trueb. false18. A method that executes because it is called automatically when an appropriate event occurs is an event ____.a. responder b. listener c. handler d. source19. A nonstatic method cannot override a static member of a parent class.a. True b. False20. A subclass cannot extend more than one class, but may implement any number of interfaces.a. Trueb. false21.A subclass of a non-abstract class must be non-abstracta. Trueb. false22. A(n) ____ class is a class that you create only to extend from.a. Abstractb. Inheritance c. Parentd. final23. A(n) ____ looks much like a class, except that all of its methods (if any) are implicitly public and abstract.a. hash code b. package c. collision d. interface24. All classes in Java are inherited from which class? a. java.lang.classb. java.class.inherited c. java.class.objectd. java.lang.Object25. All methods in an interface are abstract. a. trueb. false26.An abstract class can be extended. a. trueb. false27. An application’s ability to select the correct subclass method is known as ____.a. implementing methodsb. dynamic method binding c. implicit castingd. method fixing28. An error is generated by the compiler when you attempt to override a static method with a nonstatic method.a. Trueb. False29. An interface can be a separate unit and can be compiled into abytecode file. a. Trueb. false30. An interface can extend any number of interfaces using the extendskeyword.a. Trueb. false31. An interface can extend any number of interfaces using theimplements keyword. a. Trueb. false32. An interface cannot extend more than one interface.a. Trueb. false33. An object that is interested in an event is called a source.a. Trueb. False34. An object that waits for and responds to an event from a GUIcomponent is a ………………… a. event listenerb. GUI listenerc. collection class d. click listener35. A class diagram consists of a rectangle divided into three sections.a. Trueb. False36. A class that will be placed in a nondefault package for others touse must be private. a. Trueb. False37.A(n) ____ is not an object, but it points to a memory address.a. abstract class b. referencec. extendd. interface38. To set the background colour of a JApplet or a JFrame, the following Java statement could be used getContentPane().setBackground(new Color(0xff00ff));An alternative Java statement that achieves exactly the same effect is: getContentPane().setBackground(new Color(–,–,–));a. 250,00,250 b. 255,0,255c. 255,00,255d. 250,0,25039. Arrows used in a ____ to show inheritance relationships extend fromthe descendant class and point to the original class. a. method diagramb. UML diagramc. virtual method call d. composition40. Assume an employee can work for only one company. What is the best suitable relationship between Company and Employee?a. Noneb. Aggregation c. Inheritance d. Composition41.Assume Calendar calendar = new GregorianCalendar(). ________ returns the month of the year.a. calendar.get(Calendar.MONTH)b. calendar.get(Calendar.MONTH_OF_YEAR) c. calendar.get(Calendar.WEEK_OF_MONTH) d. calendar.get(Calendar.WEEK_OF_YEAR)42. Assume Calendar calendar = new GregorianCalendar(). ________ returns the number of days in a month.a. calendar.get(Calendar.MONTH)b. calendar.get(Calendar.MONTH_OF_YEAR)c. calendar.get(Calendar.WEEK_OF_MONTH)d. calendar.get(Calendar.WEEK_OF_YEAR)e. calendar.getActualMaximum(Calendar.DAY_OF_MONTH)43.Assume Calendar calendar = new GregorianCalendar(). ________ returns the week of the year.a. calendar.get(Calendar.MONTH)b. calendar.get(Calendar.MONTH_OF_YEAR) c. calendar.get(Calendar.WEEK_OF_MONTH) d. calendar.get(Calendar.WEEK_OF_YEAR)44. At least one method in an abstract class must be abstract. a. trueb. false45.At line number 2 below, choose 3 valid data-type attributes/qualifiers among final, static, native, public, private, abstract, protectedpublic interface Status {/* insert qualifier here */ int MY_VALUE = 10;}a. final, native, private b. final, static, protected c. final, private, abstract d. final, static, public46. Can an object of a child type be assigned to a variable of the parent type?For example: Card crd; BirthDay bd = new BirthDay(“Lucinda”, 42); ncrd = bd;a. No-there must always be an exact match between the variable and the object types.b. No-but a object of parent type can be assigned to a variable of child type.c. Yes-an object can be assigned to a reference variable of the parent type.d. Yes-any object can be assigned to any reference variable.47. Classes classes.a. True b. False48. The following statement produces a green color: Color green = new Color(100, 0, 100);a. True b. False49.Composition means ________.a. that data fields should be declared privatefrom which objects can be instantiated are called constantb. that ac. that ad. that aobject50. Consider the following Java statement; private static double num = 65.4; What does the reserved word static mean?a. The variable num belongs to the object rather than the classb. The variable num cannot be changedc. The variable num is fixed in size.d. There is one copy of num per object51.Does Java support multiple level inheritance? a. Trueb. False 52.Encapsulation means ________.a. that b. that c. that d. thatdata fields should be declared privatea class can extend another classa variable of supertype can refer to a subtype object a class can contain another classclass extends another classvariable of supertype refers to a subtype object class contains a data field that references another53. Every class has a toString() method and an equals() method. a. trueb. false54.Every JavaFX main class ________.a. implements javafx.application.Application b. extends javafx.application.Applicationc. overrides start(Stage s) method d. overrides start() method55.Every object is an instance of the Object class a. trueb. false56. Given two reference variables t1 and t2, if t1 == t2 is true, t1.equals(t2) must be ________.a. true b. false57. Given two reference variables t1 and t2, if t1.equals(t2) is true, t1 == t2 ________.a. is always trueb. is always falsec. may be true or false58. If a class inheriting an abstract class does not define all of its function then it will be known as?a. Abstractb. A simple classc. Static classd. None of the mentioned59. If a data field is declared in the superclass, you may hide it by redeclaring it in the subclass.a. true b. false60. If a method is declared private in the superclass, you may declare the method protected in the subclass.a. true b. false61. If a method is declared private in the superclass, you may declare the method public in the subclass.a. trueb. false62. If a method is declared protected in the superclass, you maydeclare the method private in the subclass. a. trueb. false63. If a method is declared protected in the superclass, you maydeclare the method public in the subclass. a. trueb. false64. If a method is declared public in the superclass, you may declare the method private in the subclass.a. true b. false65. If a parameter is of the java.lang.Object type, you can pass any object to it. This is known as generic programming.a. true b. false66. If a user enters more characters than specified in a JTextField, the extra characters are deleted.a. True b. False67. If an object is an instance of class A, and class A is a subclass of class B, then the object is also an instance of class B.a. true b. false68. If Java did not allow you to ____ classes, you would need to create every part of a program from scratch.a. extend b. override c. abstract d. import69. If jrStudent is an object of Student, which of the following statements will result in a value of true?a. Student = instanceof jrStudent b. jrStudent instanceof Student c. instanceof Student = jrStudent d. Student instanceof jrStudent70. If super class and sub class have same variable name, which keyword should be used to use super class?a. superb. thisc. upperd. classname71. In a UML diagram, an inheritance relationship is indicated with an arrow that points from the original class to the descendant class.a. True b. False72. In OOP, a reference variable can reference a subtype object. This is called ________.a. encapsulation b. inheritance c. polymorphism d. abstraction73. In OOP, you declare a class that extends another class. This is called ________.a. encapsulation b. inheritance c. polymorphism d. abstraction74. In OOP, you declare a data fields to be private. This is called ________.a. encapsulation b. inheritance c. polymorphism d. abstraction75. In order to restrict a variable of a class from inheriting to sub class, how variable should be declared?a. Protected b. Private c. Publicd. Static76.Inheritance means ________.a. that data fields should be declared privateb. that a class can extend another classc. that a variable of supertype can refer to a subtype object d. that a class can contain another class77. Instead of using the automatic toString() method with your classes, it is usually more useful to write your own ____ version of the toString() method that displays some or all of the data field values for the object with which you use it.a. overloaded b. protected c. staticd. overridden78. Java provides you with a Font class from which you can create an object that holds typeface and size information.a. True b. False79. Must a program respond to all events that its components generate?a. Yes-the program that is running must handle all events thathappen in anywhere one the screen or mouse.b. No-it can safely ignore events that don’t concern it.c. Yes-if an event is generated that it can’t handle it willbomb.d. No-the operating system sends the program only those eventsit can handle.80.Object-oriented programming allows you to derive new classes from existing classes. This is called ________.a. encapsulation b. inheritancec. abstractiond. generalization81.Object-oriented programming allows you to derive new classes from existing classes. This is called ____________.a. encapsulationb. inheritancec. abstractiond. generalization82.Polymorphism means ________.a. that data fields should be declared privateb. that a class can extend another classc. that a variable of supertype can refer to a subtype object d. that a class can contain another class83.public B(Strign s)a. The program has a compilation error because A does not havea default constructor.b. The program has a compilation error because the defaultconstructor of A invokes the default constructor of B, butB does not have a default constructor.c. The program would compile fine if you add the followingconstructor into A: A(String s) { }d. The program would compile fine if you add the followingconstructor into A: A(String s) { super(s);84. Sometimes the superclass data fields and methods are not entirely appropriate for the subclass objects; in these cases, you want to ____ the parent class members.a. negate b. overrule c. override d. hide85. Static members are not inherited to sub class. a. Trueb. False86. Super classes contain more features than their subclasses. a. trueb. false87. Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a default constructor. Which of the following is correct?a. A a = b. A a = c. B b = d. B b =new A();new B();new A();new B();88. Suppose A is an interface, B is a concrete class with a default constructor that implements A. Which of the following is correct?a. A a = new A(); b. A a = new B(); c. B b = new A(); d. B b = new B();89. Suppose a JavaFX class has a binding property named weight of the type DoubleProperty. By convention, which of the following methods are defined in the class?a. public double getWeight()b. public void setWeight(double v)c. public DoubleProperty weightProperty() d. public double weightProperty()e. public DoubleProperty WeightProperty()90. The ability to use inheritance in Java makes programs easier to write, ____, and more quickly understood.a. fasterb. more securec. more robustd. less error prone91. The capability to inherit from more than one class is called ____. a. multiple inheritanceb. collisionc. polyinheritanced. dynamic method binding92. The class Date, Calendar, and ArrayList are in the ________ package.a. java.lang b. javax.swing c. java.util d. java.io93. The class used as a basis for inheritance is the ____ class. a. childb. extends c. based. derived94. The Color class can be used with the setBackground() and setForeground() methods of the ____ class.a. Container b. JPanelc. Component d. JFrame95. The equals method is defined in the Object class. Which of the following is correct to override it in the String class?a. public boolean equals(String other)b. public boolean equals(Object other)c. public static boolean equals(String other) d. public static boolean equals(Object other)96. The instanceof operator is used to determine whether an object is an instance of a certain class.a. true b. false97. The java.lang package contains fundamental classes and is imported automatically each time a program is written.a. True b. False98. The methods in a subclass can use all of the data fields and methods that belong to its parent, with one exception: ____ members of the parent class are not accessible within a child class’s methods.a. private b. publicc. finald. protected99. The name of abstract class and interface is in italic in the UML. a. trueb. false100.The Object class equals() method returns a(n) ____ value indicating whether the objects are equal.a. intb. equals c. nulld. Boolean101.The Object class ____ method converts an Object into a String that contains information about the Object.a. equals() b. setType() c. toString() d. speak()102. The order in which modifiers appear before a class or a method is important.a. true b. false103. The relationship between an interface and the class that implements it is ________.a. Composition b. Aggregation c. Inheritance d. None104. The set of all instances of a subclass is a subset of the instances of its superclass.a. true b. false105. The size of ________ can grow and shrink at runtime. a. an arrayb. an ArrayList106. The Swing classes are part of a more general set of UI programming capabilities that are collectively called the ____.a. JavaX Classesb. Java Foundation Classes c. UI packagesd. Java Extension Libraries107. The three software parts of a GUI program are: a. Windows, Buttons, Miceb. GUI Components, Graphics, Codec. GUI Components, Event Listeners, Application Code d. Frames, Code, Events108. The UML uses ________ before a member name to indicate that the member is private.a. + b. – c. d. ?109. The UML uses ________ before a member name to indicate that the member is public.a. + b. – c. d. ?110. The UML uses ________ before a member name to indicate that the member is protected.a. + b. – c. d. ?111. The UML uses ________ before a member name to indicate that the member is package-private.a. +b. -c. d. none (blank)112. The visibility of these modifiers increases in this order ________.a. private, protected, none (if no modifier is used), and publicb. private, none (if no modifier is used), protected, and publicc. none (if no modifier is used), private, protected, and publicd. none (if no modifier is used), protected, private, and public113. The wildcard in the import java.awt.* statement imports all types in the java.awt package, including java.awt.Color and java.awt.Font.a. True b. False114. The ____ method is useful in debugging a program because it can be used to display and examine values.a. finalize() b. toString() c. notify() d. equals()115. The ________ properties are defined in the javafx.scene.text.Text class.116. To117. Toa. textb. xc. underlined. all the aboveadd a circle object into a pane, use ________. a. pane.add(circle);b. pane.addAll(circle);c. pane.getChildren().add(circle);d. pane.getChildren().addAll(circle);add a node into a pane, use ________. a. pane.add(node);b. pane.addAll(node);c. pane.getChildren().add(node);d. pane.getChildren().addAll(node);119. Toa. pane.getChildren().add(node, 1, 2); b. pane.add(node, 1, 2);c. pane.getChildren().add(node, 0, 1); d. pane.add(node, 0, 1);e. pane.add(node, 1, 0);add two nodes node1 and node2 into a pane, use ________. a. pane.add(node1, node2);b. pane.addAll(node1, node2);c. pane.getChildren().add(node1, node2);d. pane.getChildren().addAll(node1, node2);add a node to the the first row and second column in a118. ToGridPane pane, use ________.120. Topane, use ________.add two nodes node1 and node2 to the first row in a GridPanea. pane.add(node1, 0, 0); pane.add(node2, 1, 0); b. pane.add(node1, node2, 0);c. pane.addRow(0, node1, node2);d. pane.addRow(1, node1, node2);e. pane.add(node1, 0, 1); pane.add(node2, 1, 1);121. To construct a Polygon with three points x1, y1, x2, y2, x3, and y3, use ________.122. To123. To124. To125. Toa. new Polygon(x1, y1, x2, y2, x3, y3)b. new Polygon(x1, y2, x3, y1, y2, y3)c. Polygon polygon = new Polygon();polygon.getPoints().addAll(x1, y1, x2, y2, x3, y3)d. Polygon polygon = new Polygon();polygon.getPoints().addAll(x1, y2, x3, y1, y2, y3)place a node in the left of a BorderPane p, use ________. a. p.setEast(node);b. p.placeLeft(node);c. p.setLeft(node);d. p.left(node);place two nodes node1 and node2 in a HBox p, use ________. a. p.add(node1, node2);b. p.addAll(node1, node2);c. p.getChildren().add(node1, node2);d. p.getChildren().addAll(node1, node2);remove a node from the pane, use ________. a. pane.remove(node);b. pane.removeAll(node);c. pane.getChildren().remove(node);d. pane.getChildren().removeAll(node);remove two nodes node1 and node2 from a pane, use ________. a. pane.remove(node1, node2);b. pane.removeAll(node1, node2);c. pane.getChildren().remove(node1, node2);d. pane.getChildren().removeAll(node1, node2);126. Using the keyword ____ provides you with an intermediate level of security between public and private access.a. protected b. thisc. superd. secure127. Using which of the following, multiple inheritance in Java can be implemented?a. Interfacesb. Multithreadingc. Protected methods d. Private methods128. Usually GUI programs are written by using existing software components provided in a toolkit or a package. The Java toolkit used in GUI program is the:a. GUI toolkitb. Application Windowing Toolkit c. Graphics Event Toolkitd. Java Enhancement Toolkit129. What determines what method is run in the following: Card crd = new BirthDay(“Lucinda”, 42); crd.greeting();a. The type of the object.b. The type of the reference variable. c. All of the optionsd. None of the options130. What interface must a class implement in order to be a listener for Button ActionEvents?a. TextListener b. Runnablec. ActionListener d. ImageConsumer131. What is a container object in GUI programming?a. A container isb. A container isc. A container isactual data.d. A container isanother name for an array or vector.any class that is made up of other classes. a primitive variable that contains thean object like a Frame that has other GUI components placed inside of it.132. What is an advantage of polymorphism?a. The same program logic can be used with objects of severalrelated types.b. Variables can be re-used in order to save memory.c. Constructing new objects from old objects of a similar typesaves time.d. Polymorphism is a dangerous aspect of inheritance andshould be avoided.133. What is it called when a program is written to respond to the button clicks, menu selections, and other actions of the user in whatever order the user does them?a. Event-driven programming. b. Action-driven programming. c. User-driven programming. d. Mouse-driven programming134. What is not type of inheritance? a. Single inheritanceb. Double inheritancec. Hierarchical inheritance d. Multiple inheritance135. What is polymorphism in Java?a. It is when a single variable is used with several differenttypes of related objects at different places in a program.b. It is when a program uses several different types ofobjects, each with its own variable.c. It is when a single parent class has many child classes.d. It is when a class has several methods with the same name but different parameter types.136. What is the best Faculty?a. Composition b. Aggregation c. Inheritance d. Nonesuitable relationship between Employee and137. What is the Java container are displayed?software that determines how the components of aa. Display Manager b. Component Manager c. Stage Managerd. Layout Manager138. What is the process of defining a method in subclass having same name & type signature as a method in its superclass?a. Method overloadingb. Method overridingc. Method hidingd. None of the mentioned139. What method is used to initialize the size of a Frame() object? a. setsize(int width, int height)b. setsize(int height, int width)c. setSize(int width, int height)d. SetSize(int height, int width)140. What method is used to prevent a user from changing the size of a Frame() object?a. setResizable( true ) b. setResizable( false ) c. setResizeable( true ) d. setEditable( false )141. What method of a Frame changes its color?{ a. setBackground( Color c )b. setForeground( Color c ) c. add()d. getBackground()142. What method of a Frame is used to set the layout manager? a. setLayout()b. add()c. actionPerformed() d. setVisible()143. What modifier should you use on a class so that a class in the same package can access it but a class in a different package cannot access it?a. public b. privatec. protectedd. Use the default modifier144. What method of a Frame object is used to place a GUI component (such as a button) into the Frame?a. insert(Component c) b. add(Component c)c. draw(Component c) d. click(Component c)145. What modifier should you use on the members of a class so that they are not accessible to another class in a different package, but are accessible to any subclasses in any package?a. publicb. privatec. protectedd. Use the default modifier146. What three types of software are needed in a complete GUI program a. GUI Components, Event Listeners, Application Codeb. Action Events, Window Objects, Containersc. Frames, Windows, Containersd. Libraries, Toolkits, Interfaces147. What two things must your program do to respond to a particular type of event?a. Set up an event generator, and set up an event listener.b. Create an event listener object for the type of event, andregister it with the object that generates those events.c. Create a container for the events, and register it with thesystem.d. Create a Frame object and register it with the eventlisteners.148. What type of event is generated when the user presses the enter key in a JTextField?a. ActionEventb. ActionListener c. TextEventd. ItemEvent149. What would be the result if class extends two interfaces and both have method with same name and signature?a. Runtime errorb. Compile time errorc. Code runs successfullyd. First called method is executed successfully150. When a class both extends and implements, by convention the ____ clause follows the extends clause in the class header.a. extendsb. newc. implementsd. if151. When a protected data field or method is created, it can be used within its own class or in any classes extended from that class; but it cannot be used by outside classes.a. True b. False152. When a user closes a JFrame by clicking the Close button in the upper-right corner, the default behavior is for the JFrame to close and the application to terminate.a. Trueb. False153. When constructing a Font object, which of the following argumentsis NOT required? a. typefaceb. stylec. weightd. point size154. When should your program call repaint()?a. Never-that is the system’s job.b. Only once when the frame is created.c. Whenever it has made a change to what should be displayedin the Frame.d. Always-whenever any method finishes.155. When you create a class and do not provide a(n) ____, Java automatically supplies you with a default one.a. constructor b. argumentc. headerd. name156. When you create a class and use the implements clause to implement an interface but fail to code one of the interface’s methods, the compiler error generated indicates that you must declare your class to be ____.a. abstract b. static c. public d. related157. When you create a class by making it inherit from another class, the new class automatically contains the data fields and _____ of the original class.a. fontsb. methodsc. class names d. arrays158. When you create a class that uses an interface, you include the keyword extends.a. True b. False159. When you create a superclass and one or more subclasses, each object of each subclass is a subclass object.a. True b. False160. When you create any subclass object, the subclass constructor must execute first, and then the superclass constructor executes.a. True b. False161. When you create parent and child classes of your own, the child classes use ____ constructors.a. twob. As many c. fourd. six162. When you define a class, if you do not explicitly extend another class, your class is an extension of the ____ class.a. Object b. superc. public d. abstract163. When you employ ____, your data can be altered only by the methods you choose and only in ways that you can control.a. virtual method calls b. polymorphismc. information hiding d. inlining164. When you place a component on the screen, the vertical position is the x-axis and the horizontal position is the y-axis.a. True b. False165. Which method do you use to assign a font object to a JLabel? a. setFont()b. fontLabel() c. assignFont() d. JLabel.font()166. Which method overrides the default behavior for the JFrame to be positioned in the upper-left corner of the computer screen’s desktop?a. setSize()b. title()c. etBounds()d. isResizable()167. Which of the following are binding properties?a. Integerb. Doublec. IntegerProperty d. DoubleProperty168. Which of the following are Java keywords? a. instanceOfb. instanceof c. castd. casting169. Which of the following can be used as a source for a binding properties?a. Integerb. Doublec. IntegerProperty d. DoubleProperty e. String170. Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class A { abstract void unfinished(); }c. abstract class A { abstract void unfinished(); }d. public class abstract A { abstract void unfinished(); }171. Which of the following classes cannot be extended? a.class A { }b. class A { private A();} c. final class A { }d. class A { protected A();}172. Which of the Java class?{a. publicb. publicc. publicd. publice. public173. Which of thea. interface A { void print() { }; }b. abstract interface A { print(); }c. abstract interface A { abstract void print() { };}d. interface A { void print();}174. Which of the following is incorrect?a. A constructor may be static.b. A constructor may be private.c. A constructor may invoke a static method.d. A constructor may invoke an overloaded constructor.e. A constructor invokes its superclass no-arg constructor bydefault if a constructor does not invoke an overloaded constructor or its superclass’s constructor.following declares an abstract method in an abstractabstract method(); abstract void method(); void abstract Method(); void method() { }abstract void method() { }following is a correct interface?{175. Which of the following is incorrect?a. An abstract class contains constructors.b. The constructors in an abstract class should be protected.c. The constructors in an abstract class are private.d. You may declare a final abstract class.e. An interface may contain constructors.176. Which of the following is poor design?a. A data field is derived from other data fields in the sameclass.b. A method must be invoked after/before invoking anothermethod in the same class.c. A method is an instance method, but it does not referenceany instance data fields or invoke instance methods.d. A parameter is passed from a constructor to initialize astatic data field.177. Which of the following is used for implementing inheritance through class?a. inherited b. usingc. extendsd. implements178. Which of the following is used for implementing inheritance through interface?a. inherited b. usingc. extendsd. implements179. Which of the following methods override the equals method in the Object class?a. public void equals(Object o)b. public boolean equals(Object o)c. public boolean equals(SomeType o)d. public static boolean equals(Object o)180. Which of the following methods override the toString method in the Object class?a. public void toString(String s)b. public static String toString()c. public String toString()d. public String toString(String s)181. Which high?of the following sets the frame to 300 pixels wide by 200182. Which FlowPane?a. frm.setSize( 300, 200 );b. frm.setSize( 200, 300 );c. frm.paint( 300, 200 );d. frm.setVisible( 300, 200 );of the following statements are correct to create aa. new FlowPane()b. new FlowPane(4, 5)c. new FlowPane(Orientation.VERTICAL);d. new FlowPane(4, 5, Orientation.VERTICAL);183. Which of the following statements are correct?a. new Scene(new Button(“OK”));b. new Scene(new Circle());c. new Scene(new ImageView());d. new Scene(new Pane());184. Which of the following statements are correct?a. Every subclass of Node has a no-arg constructor.b. Circle is a subclass of Node.c. Button is a subclass of Node.d. Pane is a subclass of Node.e. Scene is a subclass on Node.185. Which of the following statements are correct?a. A Color object is immutable.b. A Font object is immutable.c. You cannot change the contents in a Color object once it iscreated.d. You cannot change the contents in a Font object once it iscreated.186. Which of the following statements are correct?a. Integer i = 4.5;b. Double i = 4.5;c. Object i = 4.5;d. Number i = 4.5;187. Which of the following statements are true about abstract classes?a. An abstract method cannot be contained in a nonabstract class.b. If a subclass of an abstract superclass does not implement all the abstract methods, the subclass must be declared

What modifier should you use on a class so that a class in the same package can access it but a class including subclass in a different package Cannot access it?

The private modifier specifies that the member can only be accessed in its own class. The protected modifier specifies that the member can only be accessed within its own package (as with package-private) and, in addition, by a subclass of its class in another package.

Which modifier can be used to restrict inheritance?

The final modifier can be used to restrict inheritance. A class used to represent a generic concept in a class hierarchy. An abstract class cannot be instantiated.

When you use the method name with a child object the parents version of the method is used?

When you use the method name with a child object, the parent's version of the method is used. When you create any subclass object, the subclass constructor must execute first, and then the superclass constructor executes. A nonstatic method cannot override a static member of a parent class.

Is the technique of using the same method name to indicate different implementations?

Polymorphism - "many forms" using the same method name to indicate different implementations. b. When you create a method in the child class that has the same name and parameter list as a method in its parent class, you override the method in the parent class.