Question

24 Suppose you have created a list using the statement ArrayList String> NYIT CS Courses new ArrayList(31 What would java do
ANS check one with x: LI Yes LINo
question 27’s end is in the next page
24 Suppose you have created a list using the statement ArrayList String> NYIT CS Courses new ArrayList(31 What would java do when you try to insert more than 31 courses? ANS: LinelI) check one with x: continue process as usual I Ijava automatically expand array space you manually expand more array spaces 25 Suppose NYIT CS COurscs is an object of the class Array List Suring Write Java statements that will display all the elements in the list on the screen with one line of for loop and a GUIl style O/P statement ANS Answer in ANS: Linet Answer in ANS: Line(2) 026.1 Can you define a list of objects besides String object with a regular array declaration? 26 026.2 Can you define an object list with class Array List for primitive type double? check one with s LLYes LINO Liner 2) ANS Linet) check one with 1 Yes LINo Examine the following class ArrayList syntax formats for creating and naming an instance of ArrayList. Would all perform the same ArrayList Base type> variable new ArrayList Base type> (size) ArrayList Base type? variable new ArrayLis> (size) ArrayList Base types variable - new ArrayListO
ANS check one with x: LI Yes LINo
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please let me know if you have any doubts or you want me to modify the answer. And if you find this answer useful then don't forget to rate my answer as thumps up. Thank you! :)

Examine the following class ArrayList syntax formats for creating and naming an instance of ArrayList.
Would you all perform the same function?

ArrayList<Base_type> variable = new ArrayList<Base_type>(size)
ArrayList<Base_type> variable = new ArrayList<>(size)
ArrayList<Base_type> variable = new ArrayList<>()


Answer:
No.
Because when you declare and initialise the ArrayList you need declare the base_type as well.
Here in above scenario, only in first declaration Base_type is declare and initialise.

Add a comment
Know the answer?
Add Answer to:
question 27’s end is in the next page 24 Suppose you have created a list using the statement ArrayList String> NYIT CS Courses new ArrayList(31 What would java do when you try to insert more...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT