Given: Which statement is true?()
A.420 is the output. B.An exception is thrown at runtime. C.All constructors must be declared public. D.Constructors CANNOT use the private modifier. E.Constructors CANNOT use the protected modifier.
单项选择题A company that makes Computer Assisted Design (CAD) software has, within its application, some utilityclasses that are used to perform 3D rendering tasks. The company’s chief scientist has just improved theperformance of one of the utility classes’ key rendering algorithms, and has assigned a programmer toreplace the old algorithm with the new algorithm. When the programmer begins researching the utilityclasses, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class’s API, and replaces the old algorithm with the new algorithm, being carefulthat her changes adhere strictly to the class’s API. Once testing has begun, the programmer discovers thatother classes that use the class she changed are no longer working properly. What design flaw is mostlikely the cause of these new bugs?()
A.Inheritance B.Tight coupling C.Low cohesion D.High cohesion E.Loose coupling
单项选择题Given: What is the result?()
A.b 3 B.b 8 C.b 13 D.f 3
A.12 B.The code runs with no output. C.An exception is thrown at runtime. D.Compilation fails because of an error in line 21. E.Compilation fails because of an error in line 22. F.Compilation fails because of an error in line 31.
多项选择题A company has a business application that provides its users with many different reports: receivables reports, payables reports, revenue projects, and so on. The company has just purchased somenew, state-of-the-art, wireless printers, and a programmer has been assigned the task of enhancing all ofthe reports to use not only the company’s old printers, but the new wireless printers as well. When the programmer starts looking into the application, the programmer discovers that because of the design of theapplication, it is necessary to make changes to each report to support the new printers. Which two designconcepts most likely explain this situation? ()
A.Inheritance B.Low cohesion C.Tight coupling D.High cohesion E.Loose coupling F.Object immutability
单项选择题Given: String[] elements = { for , tea , too }; String first = (elements.length > 0) ? elements[0] : null; What is the result?()
A.Compilation fails. B.An exception is thrown at runtime. C.The variable first is set to null. D.The variable first is set to elements[0].