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
Paha777 [63]
3 years ago
10

Create a stack with three integers and then use .toarray to copy it to an array.

Computers and Technology
1 answer:
Marizza181 [45]3 years ago
6 0

Answer:

import java.util.*;

import java.lang.*;

import java.io.*;

class Codechef

{

public static void main (String[] args)

{

    Stack<Integer> mat=new Stack<Integer>();

    mat.add(1);

    mat.add(3);

    mat.add(6);

    System.out.println(mat);

    Object [] a=mat.toArray();

    for(int i=0;i<a.length;i++)

    System.out.println(a[i]);

}

}

Explanation:

An integer type stack st is created;

1,3 and 6 are added to the stack.

printing the contents of the stack.

array a is created form the stack using toArray().

Then printing the array.

You might be interested in
Vẽ sơ đồ lắp đặt gồm 2 cầu chì, 1 ổ điện, 2 cực điều khiển 2 đèn mắc song song
Nookie1986 [14]

Answer:

okokikhjhghjjjkkkkkokoloo

7 0
3 years ago
Choose the statements that CORRECTLY describe a business organization.​
Kryger [21]

Answer:

An advantage to Corporations aI's a business organization is that they enjoy unlimited life and limited liability.

Explanation:

Unlimited life and limited liability are the major advantages of corporations.

Corporations have unlimited life unless all the shareholders decides to dissolve the corporation.

It has limited liability, it means that only the company assets will be sold in case of debt and investors are not liable to pay the debt.

3 0
3 years ago
If you delete selected cells using the Delete key on your keyboard, only the _______ of the cells is removed. formatting content
kap26 [50]
If you delete selected cells using the Delete key on your keyboard, only the _______ of the cells is removed.
Content
8 0
3 years ago
Read 2 more answers
The disadvantage of this topology is that a problem with one node will crash the entire network.
DanielleElmas [232]

Answer:

Bus Topology

Explanation:

In local area networks (LANs), Bus topology is used to connect all the computers on the single cable. This cable is called backbone of the network.  In this type of network when a computer sends data, it will be received on entire network.

For Example

In water line system, all the taps that are connected to single pipe. If the pipe or a single tap broken this will affect the whole system.

Entire system can be crash if any node or wire will break.

6 0
3 years ago
Consider the following code: x=random.randint (1, 100) The randint is a ____.​
Mrrafil [7]
Random integer, in this case betweeen 1 and 100
5 0
3 years ago
Other questions:
  • Given a floating point variable fraction, write a statement that displays the value of fraction on the screen. Do not display an
    13·1 answer
  • Swapping two numbers
    10·1 answer
  • The following is a sequence of undo-log records written by two transactions T and U: &lt; START T&gt;; ; &lt; START U&gt;; ; ; ;
    8·1 answer
  • Jamie has to enter the names, grades, and scores of a group of students into a worksheet. Which option will Jamie use to describ
    15·1 answer
  • Explain the impacts of computer in education
    6·2 answers
  • You are a computer consultant called in to a manufacturing plant. The plant engineer needs a system to control their assembly li
    10·1 answer
  • A _____________ is designed for a individual user.
    9·1 answer
  • The use of desktop computer equipment and software to create high-quality documents such as newsletters, business cards, letterh
    14·1 answer
  • How does the technology work
    10·2 answers
  • How should you respond to the theft of your identity cyber awareness.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!