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
•Should other states wait to see if the high-speed rail system works well before starting their own plans for similar systems?
solmaris [256]
Other states should see how well the system works and also understand how much money it requires for the state to build a high-speed rail system.
7 0
3 years ago
Write one line Linux command that performs the required action in each of the problems given below: (a) Find the difference in t
Luda [366]
You have to add the integer
8 0
2 years ago
Allowing every communication is a bad idea from a security standpoint as well as a productivity one.TrueFalse
s344n2d4d5 [400]

Answer:

The answer to this question is True.

Explanation:

If we allow every communication this will not be a great idea if we want better security and better productivity.

There will be a lot of spam communications so the productivity and the security will also degrade because of that.

So if we want better productivity and security we have to allow a certain number of connections.

Hence the answer to this question is True.

4 0
3 years ago
Discuss the role of the concept behind the "Internet of Things (IoT)" in today's digitally connected society.
AlekseyPX

Answer:

IoT Definitions: The term Internet of Things generally refers to scenarios where network connectivity and computing capability extends to objects, sensors and everyday items not normally considered computers, allowing these devices to generate, exchange and consume data with minimal human intervention.

Explanation:

hope that helps

7 0
3 years ago
United Broke Artists (UBA) is a broker for not-so-famous artists. UBA maintains a small database to track painters, paintings, a
lions [1.4K]

Answer:

Check the explanation

Explanation:

Kindly check the attached image below to see the relation and the table names.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Give one advantage and two disadvantages of using a wireless network
    8·1 answer
  • How is counting in this circle and square system similar to how we count in our regular lives? How is it different?
    15·1 answer
  • Which of the following is NOT a safe skill you can use to reduce your risk
    11·2 answers
  • function calculate () { var s = 2; var x = 2; var y = 3; if (x &gt; 4) { s=s+ 2; } else if ( y &gt; 4) { s=s+ 4; } else { s+=3;}
    11·1 answer
  • Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what
    13·1 answer
  • CS160 Computer Science I In class Lab 10
    15·1 answer
  • Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
    7·1 answer
  • The goal of this problem is to cover all roads with cameras. A camera placed at a station can cover all the roads connected to i
    9·1 answer
  • Please help me ASAP!
    11·2 answers
  • Find examples of conic sections in art and architecture. Visit Web sites to find pictures of artwork or buildings that illustrat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!