Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6. list is an arraylist which stores String values. Examine the following code: list.add( Ali); list.add( Baran); list.add( Cemre); list.add(Defne); list.add( Elmas); Which of the
6. list is an arraylist which stores String values. Examine the following code: list.add( "Ali"); list.add( "Baran"); list.add( "Cemre"); list.add("Defne"); list.add( "Elmas"); Which of the following option will change the list so that it looks like: Ali Baran Cemre Defne Omer Elmas a) a) o list.add( 4, "Omer") b) list.set( 4, "Omer") c) O list.add( 3, "Omer") d) o list.set( 3, "Omer") 7. Say that there are three classes: Computer, AppleComputer, and IBM Computer. What are the likely relationships between these classes? a a) Computer is the superclass, AppleComputer and IBM Computer are subclasses of Computer b) Computer is a superclass, AppleComputer is a subclasses of Computer, and IBMComputer is a sublclas of AppleComputer C C) O IBM Computer is the superclass, AppleComputer and Computer are subclasses of IBM Computer. d) Computer, AppleComputer and IBM Computer are sibling classes. d 8. A new car object named "a" has been created below. Car a = new Car ("Ford", 2014); Which of the following statements adds this object to the ArrayList named Carlist? l.a.add() II.a.add(Carlist) III. Carlist.add() IV.Carlist.add (a) You can also see the options in the following picture: 1. a.add () II. a.add (Carlist) III. Carlist.add () . IV. Carlist.add (a) a) a O b) IV O C) II d) O
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