Question: A program has created an Object called friend. This object includes the following fields: firstName, bDay, favColour and phoneNumber. An ArrayList of the object

A program has created an Object called "friend." This object includes the

following fields: firstName, bDay, favColour and phoneNumber. An ArrayList of the object


A program has created an Object called "friend." This object includes the following fields: firstName, bDay, favColour and phoneNumber. An ArrayList of the object friend is declared with the following statement: ArrayList < friends = new ArrayList (); The following information in the chart image(click on to expand) is then input Into the ArrayList. The following line created the output for the program: System.out.printin (friends.get(0).firstName + ** +friends.get(1).phoneNumber + friends.get(2).favColour + ** + friends.get(3).bDay); What is the output of the code? firstName bDay favColour phoneNumber Caroline December 9 Pink 519-555-1212 Andy Penny Frank July 13 Blue 416-555-1111 December 3 Black 999-555-3232 October 3 Green 617-521-1200

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 Programming Questions!