Question: Using Methods Given int variables stored in a , b , c , d , e , f , and g declare a new ArrayList.

Using Methods
Given int variables stored in a,b,c,d,e,f, and g declare a new ArrayList.
Add the given variables as elements to your List
Print the elements of the List on the same line with a space separating them.
Print to the console the following concatenations of a String and the results of a method:
Print "Size:" + a method that will return the size of the List
Print "First element:" + a method that will retrieve the first element in the List
Print "Is it Empty:" + a method that will return a Boolean after checking if The List is empty
Use the methods to know for Lists section above to help you determine what methods to use
 Using Methods Given int variables stored in a,b,c,d,e,f, and g declare

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!