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
The hottest part of the Earth is the
Troyanec [42]
C. Mantle would be correct
3 0
3 years ago
Read 2 more answers
If a website ends with .gov does it mean that its written by the government or?
Soloha48 [4]
Umm... No. (I'm pretty sure)
7 0
3 years ago
Read 2 more answers
What the benefit is of folder when working with files
Mariana [72]
It helps you keep things organized and easier to find files

3 0
3 years ago
Which of the following statements are true?
Mamont248 [21]

Answer:

The answer is: c. Adding external CSS is a good practice for various reasons, including code organization.

Explanation:

External CSS improves maintainability in code.  

Internal CSS has precedence over external CSS, it means that internal will overwrite external CSS, but abuse of internal CSS  often makes hard to maintain HTML code on a large website.

Furthermore, it is much easier to modify one CSS(external) file that can impact multiple web pages than go into every HTML page and modify your styles per page. Many sites have hundred or more pages, go through each one wouldn't be productive.

3 0
3 years ago
Discuss FOUR challenges that have an impact on domestic tourism
shutvik [7]
Crime rate
unemployment
fluctuations
suspension of terrorism
5 0
3 years ago
Other questions:
  • How long can a lightning last
    13·1 answer
  • What is my credit card billing zip code??
    15·1 answer
  • The _____ is a narrative description of the product, service, or information system.
    7·1 answer
  • Using the __________ option, you can change the state of a model back to where a particular feature or features weren`t yet crea
    7·1 answer
  • A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
    8·1 answer
  • hello my friend is doing a give away at 100 followers would you follow him for a chance to win 2000 vbucks his name is ZoVa_Velo
    15·2 answers
  • Please help with this coding question
    8·2 answers
  • Who know's web Design
    12·1 answer
  • PLEASE HELP!!! THIS IS DUE TODAY! WILL MARK BRAINLIEST!
    5·1 answer
  • Why is my speedtest is very good but chrome is slow
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!