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
What application service allows you to decouple your infrastructure using messaged based queues?
vivado [14]

Answer:A) SQS

Explanation: Simple Queue Service (SQS) is Amazon based service that deals in queue that decouples the micro-services infrastructure or applications.It has the benefit of maintaining of the security, eliminating complexity, transmitting the data reliably etc.

It also provides the service of the storing the message, storing it and other functioning without the integrity in its security or any other resource need.Thus, option(a) is the correct option.

6 0
3 years ago
Jacob has a text file open, and he is typing on the keyboard. What is the best description of how the
vichka [17]

Answer:

The new version is kept in a special virtual space; the file is only changed when he clicks “save.”

Explanation:

I took the test and got it correct.

7 0
3 years ago
Which of the following is true about advertisements?
katrin [286]

the answer is they often contain biases :)

3 0
3 years ago
Which principle of design does a designer apply when they create rhythmic movement in a garment by using recurring pleats or det
WITCHER [35]

Answer:

Repetition, and regular rhythm

Explanation:

Its certainly repetition method, and repetition method is of three types which are repetition, pattern and rhythm.

Remember repetition can be boring at times as we need to read same thing again and again. However, repetition sometimes can be good like the one we are referring to, and the other one can be like placing the logo or menu at same place in all web page. And its since it creates a habit in us for reading the web pages, And hence we can understand faster, and it looks please to our eyes hence as well.  

4 0
3 years ago
Write common ICT tools​
Naddika [18.5K]
  • computers
  • laptops
  • printers
  • scanners
  • software programs
  • data projectors
  • and interactive teaching box.

4 0
2 years ago
Other questions:
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
    8·1 answer
  • What are some examples of lighter-than-air vehicles?
    10·1 answer
  • Can somebody explain me what this code does in a few or one sentence?#include #include using namespace std;int main () { const i
    12·1 answer
  • Suppose arraylist list1 is [1, 2, 5] and arraylist list2 is [2, 3, 6]. after list1.addall(list2), list1 is __________.
    8·1 answer
  • Sarah, a computer user, tells James, a computer technician, that the network she is connected to is running too slowly. Which of
    5·1 answer
  • The Telecommunications Act of 1996 was a mixed bag for cable customers. Although cable companies argued that it would bring more
    8·1 answer
  • which of the following statements about matter is true a.matter is anything that occupies space and possesses mass b.matter can
    5·2 answers
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!