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
Juli2301 [7.4K]
3 years ago
5

Write java code that displays all the objects in a stack in the order in which they were pushed onto it. after all the objects a

re displayed, the stack should have the same contents as when you started. files to be submitted: taskademo.java arraystack.java stackinterface.java
Computers and Technology
1 answer:
kolbaska11 [484]3 years ago
7 0
Let's assume you have a stack called "s".
You can very simply print each element out using a for each loop (the iterable (as shown below), or a classic for each loop, if you prefer). This method does not modify the stack in any way.

s.forEach(System.out::println);
You might be interested in
Henry is studying the effects of deforestation along the slopes of hills and mountains. He wants to take a photo of a mountain s
Annette [7]

Answer:

1) pull out the legs of the tripod to gain the required height and necessary stability

2) adjust each of the legs so that the tripod is level

3) attach the camera to the tripod

5 0
3 years ago
You have a computer that runs on a windows 10 operating system and supports modern sleep. what will happen if you close the lid
adell [148]

You have a computer that runs on the Windows 10 operating system and supports modern sleep mode what will happen if you close the computer lid is the computer will be put into sleep mode. If Modern Sleep is supported, the settings for closing the lid will be configured to trigger sleep mode.

A computer system is a basic, complete and functional arrangement of hardware and software with everything needed to implement computing performance. That is the basic working definition of a computer system as we know it, but computer systems have gone through many formal changes over the last few decades.

The physical components of a computer can also be interpreted as hardware. This includes the keyboard, mouse, monitor and processor. Hardware consists of input devices and output devices that make up a complete computer system. Examples of input devices are keyboards, optical scanners, mice and joysticks that are used to enter data into a computer.

You can learn more about computer system here brainly.com/question/14583494

#SPJ4

7 0
1 year ago
What is the process called when programmers look for and fix errors in code? Analysis Debug Document Error check
Sunny_sXe [5.5K]
It’s Debug. definition: “identify and remove errors from (computer hardware or software)”.
4 0
3 years ago
Read 2 more answers
X = 10<br> y = 20<br> x &gt; У<br> print("if statement")<br> print("else statement")
Ksenya-84 [330]

Answer:

n

Explanation:

n

5 0
3 years ago
Which one of the patterns have the highest pitch?​
fomenos

Answer:

The answers is B

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a calculator program using a switch statement that: a) Prompts the user to enter two numbers b) Prompts the user to select
    13·1 answer
  • design aDesign a queue abstract data type for float elements in a language that you know, including operations for enqueue, dequ
    10·1 answer
  • A _____ attack floods a network or server with service requests to prevent legitimate users' access to the system. phishing back
    5·1 answer
  • Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce
    9·1 answer
  • Which field in a Transmission Control Protocol (TCP) header provides the next<br> expected segment?
    5·1 answer
  • You are creating a presentation and you have come to the last slide. you still have more information to add. what should you do?
    10·2 answers
  • What type of media is a hard disk​
    9·1 answer
  • Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k's value
    13·1 answer
  • Which example best demonstrates an impact of computers on the economy?
    6·1 answer
  • ASAP 50 POINTS
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!