Answered step by step
Verified Expert Solution
Question
1 Approved Answer
During an interview, if you were asked to define Aggregation, select the corresponding answer that would best reflect your response. A class contains a data
During an interview, if you were asked to define Aggregation, select the corresponding answer that would best reflect your response. A class contains a data field that references another object O A variable of supertype refers to a subtype object O A method that overrides the superclass's method Data fields should be declared private None of the answers are correct O A class extends another class Consider the following code: java.util.ArrayList list = new java.util.ArrayList(); list.add("New York"); java.util.ArrayList list1 = list; list.add("Atlanta"); list1.add("Dallas"); System.out.println(list1); What will the corresponding output be? O (Dallas] O [New York, Dallas) O [New York, Atlanta] O [New York] O [New York, Atlanta, Dallas] The code will crash and there will be no output O [Atlanta, Dallas, New York] None of the answers are correct O [Dallas, Atlanta, New York] A Java programmer was taking an interview at Google and the interviewer asked the programmer, is it possible for an instance of a thread to be started more than once. The programmer says yes, this happens all the time, and is the normal workflow of the thread lifecycle. Would you say this is true or false? True False In a Java interview question, the interviewer asks a programmer to compare two strings. The programmer tells the interviewer, in Java the '==' operator can be used to compare the values of two String objects and the result is always true if and only if the Strings contain the same characters, in the same order, and follow case sensitivity. Would you say this is true or false? True False Object-oriented programming allows you to derive new classes from existing classes, which in Java is referred to as polymorphism None of the answers are correct encapsulation inheritance abstraction generalization modification serialization in To create an InputStream to read from a file on a Web server, you use the method the URL class. None of the answers are correct getInputStream(); obtainlnputStream(); readStream(); openStream(); connectStream(); Consider the following statements, which of them is true? A superclass is always abstract All of the answers are true A subclass is a subset of a superclass A superclass is usually extended to contain more functions and more detailed information created by it's subclass O A subclass is an interface to a superclass None of the answers are true
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started