Question: JAVA From 8 to 14 pleases 8. What is the difference between the two comparison statements below? What is each condition actually comparing? String s2

JAVA

From 8 to 14 pleases

 JAVA From 8 to 14 pleases 8. What is the differencebetween the two comparison statements below? What is each condition actually comparing?

8. What is the difference between the two comparison statements below? What is each condition actually comparing? String s2 = new String ("Arthur"); String s4new String ("Arthur") System.out.printin(s2-s4); System.out.println(s2.equals(s4)): 9. Write code that will compare the two Strings below for equality based on their value and print the message "equals" or "not equals". String s1"Apple" String s2"Banana"; 10. When are two reference variables aliases? Provide an example with Strings 11. Consider the two classes below. Which is the more general / specialized? Superclass / subclass? public class Foo) public class FooChild extends Foo 12. Write the WidgetChild class. It is a subclass of the Widget class in problem 1. The WidgetChild has an additional instance variable, int x a. Include a constructor that requires input b. Include getters and setters c. Add a toString() method to the WidgetChild class to print all the information about a WidgetChild. Use the overriden toString() method of the Widget class 13. Create a WidgetChild object. methods of WidgetChild Using the getters of the class and dot notation, run all the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!