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 are the differences between a trap (aka software interrupt) and an interrupt (hardware interrupt)? What is the use of each
Marta_Voda [28]

Answer:

Trap is a software interrupt that occurs when there is a system call, while hardware interrupt occurs when a hardware component needs urgent attention.

Explanation:

Interrupt is an input signal that disrupt the activities of a computer system, giving immediate attention to a hardware or software request.

In trap interrupt, the system activities are stop for a routine kernel mode operation, since it has a higher priority than the user mode. At the end of the interrupt, it switches control to the user mode.

The hardware interrupt is a signal from hardware devices like the input/output devices, storage and even peripheral devices that draws an immediate attention of the processor, stopping and saving other activities and executing the event with an interrupt handler.

6 0
3 years ago
There are some network modeling tools that can ________ the existing network.
lesya [120]
<span>There are some network modeling tools that can scan the existing network.</span>
4 0
3 years ago
Read 2 more answers
Which of the following occupations groups falls under the professional and related cluster?
velikii [3]
All choices are correct.
6 0
2 years ago
Question 8 of 10
kramer

Answer:

C. The energy used to create and maintain technology

#Carry on learning po

3 0
2 years ago
What is full meaning of CIOS in ict<br>​
arsen [322]

Answer: mark me as a brainlist i really need this plz plz plz

Explanation:

A chief information officer (CIO) is the company executive responsible for the management, implementation, and usability of information and computer technologies.

3 0
3 years ago
Read 2 more answers
Other questions:
  • What information is required for a complete citation of a website source?
    8·2 answers
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 100. Follow each number w
    8·1 answer
  • Drag each label to the correct location on the image.
    10·1 answer
  • Within the try clause of a try statement, you code a. all the statements of the program b. a block of statements that might caus
    14·1 answer
  • What are two examples of management information systems?
    12·1 answer
  • Lets say if my computer shut down every 10 minutes. What can you do to solve the problem. Hint: Use these word in you answer: ha
    10·2 answers
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
  • Instructions: Write a program that calculates the amount of ingredients needed for various flavors of cheesecake.
    13·1 answer
  • Briefly explain the emerging trends in micro computer technology in relation to size
    10·1 answer
  • Common names for computer-based information systems are transaction processing, management information, ________, and executive
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!