1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Blababa [14]
4 years ago
7

Write a program that creates an ArrayList and adds a Loan object, a Date object, a string, and a Circle object to the list, and

use a loop to display all the elements in the list by invoking the object’s toString() method. Hint: Remember every class in Java is descended from the java.lang.Object class. Define Generic Type E appropriately for the ArrayList.
Computers and Technology
1 answer:
12345 [234]4 years ago
6 0

Answer:

//importing package java.util.ArrayList to use ArrayList in the program

import java.util.ArrayList;

import java.util.Date;

public class test_array_list {

// Main method

public static void main(String[] args) {

 // Create an array list of objects

 ArrayList<Object> s = new ArrayList<Object>();

 s.add(new Loan());  

 s.add(new Date());  

 s.add(new String("String class"));

 s.add(new Circle());

 // Display all the elements in the list by

 // invoking the object’s to String() method

 for (int element = 0; element < o.size(); element++) {

  System.out.println((s.get(element)).toString());

 }

}

}

Explanation:

The Above code has proper comments to which is self explanatory.

You might be interested in
Which of the following is a valid IP address that can be used on the Internet (meaning the public addressing scheme)? Group of a
VladimirAG [237]

Answer:

168.16.1.1 is correct.

Explanation:

168.16.1.1 is the legitimate Internet Protocol address that can be used on the Internet.

Internet Protocol 10.10.1.1 and internet Protocol 172.30.1.1 are the private internet protocol addresses so they could not be used on the internet.

The Internet Protocol 234.1.1.1 has been used as a multicast address so they may not be used on the Internet.

7 0
3 years ago
What is a cell address in xsl sheet
fgiga [73]

Answer:

cell address is the exact location of a particular cell of ms-excle

Explanation:

A1 refers to first row and first column.

A2 refers to second row first column.

i.e.

in 'A1' : 'A' indicate column { A= first column, B= second

column, C= third column. and soon.....}

'1' indicate row { 1 = first row, 2 = second row, 3= third row..... soon .......}

5 0
3 years ago
Omar wants to add transitions to his presentation, so he clicks the Transitions tab. Which tasks can he now complete? Check all
ser-zykov [4K]

Answer:

a b c and d

Explanation:

edgunity 2020

7 0
3 years ago
A poem for coduction
Nataly_w [17]
I don't know if you want a poem about conduction but if so here ya go

no matter how the heat
different temperatures meet
hot to cold how it's done
4 0
4 years ago
Read 2 more answers
Can anyone give me nitrotype gold? Name username is lol3628 display name is iluvkitkats
Vsevolod [243]

Answer:

no

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Kevin wants an application that will help him create a website as well as publish it. What application can he use?
    9·1 answer
  • Electronic files created on a computer using programs such as word software are considered to be
    15·1 answer
  • Security awareness training can reduce the risk of a data breach by what percentage?
    12·1 answer
  • Who is responsible for customer service?
    14·1 answer
  • Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
    10·1 answer
  • Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr
    15·1 answer
  • How can i become an expert in computer and technology?
    15·2 answers
  • Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values
    13·1 answer
  • outline 4 IDE features that makes software development much faster and more convenient than other alternatives.​
    9·1 answer
  • The ________ function will change a character argument from lowercase to uppercase. isupper toupper tolarge fromlower none of th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!