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
The residual volume can be measured directly with: Select an answer and submit. For keyboard navigation, use the up/down arrow k
TEA [102]

The residual volume can not be measured directly.

<h3>How is residual volume measured?</h3>

Residual volume is known to be measured by what we call a gas dilution test.

Note that this test often  measures how the concentration of the gases in the container changes.

<h3>What is residual volume?</h3>

This is known to be the Volume of air that is left over after a FORCED EXPIRATION. Note that it is one that cannot be measured by a spirometer.

Hence, The residual volume can not be measured directly.

Learn more about residual volume from

brainly.com/question/12897209

#SPJ1

6 0
2 years ago
Please help me!! 10 Points are waiting!!
prisoha [69]

Google

https://google.com

Google has a large index of keywords and where those words can be found. Google uses a trademarked algorithm called PageRank, which assigns each Web page a relevancy score.

3 0
3 years ago
Which of the following commands would instruct OSPF to advertise ONLY the 192.168.10.0/24 network in Area 0?
xz_007 [3.2K]

Answer:

First, you need to start the OSPF process by executing the command:

<em>Router (config)# router ospf {process-ID#}</em>

Then, you have to instruct the router to advertise the networks that are directly linked to it by entering this network command with the area ID number for that network:

Router (config-router)# network {192.168.10.0} {255.255.255.0} area {0}

8 0
3 years ago
Write a function that asks a user for his/her name and movie
Alex777 [14]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

                     

The code is written in C++

/******************************************************************************

                             Online C++ Compiler.

              Code, Compile, Run and Debug C++ program online.

Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

#include <string>  

using namespace std;

void display()

   {

       string yourName;

       string watchedMovie;

       cout<<"What is your name?  ";

       cin>>yourName;

       cout<<"Which movie have you seen?  ";

       cin>>watchedMovie;

       cout<<"Today, I have learned that  " <<name<<" watched "<<watchedMovie<<" movie";

   }

int main()

{    

   

   display();

   return 0;

}

 

7 0
3 years ago
Sharing resources.
olya-2409 [2.1K]

Answer:

Explanation:

2- Multitasking Multitasking – Multitasking Multitasking is one among the main advantage of computer. ...

Speed – Now computer isn't just a calculating device. ...

Cost/ Stores huge – Amount of knowledge it's a coffee cost solution. ...

Accuracy – ...

Data Security – ...

Task completer – ...

Communication – ...

Productivity –

More items...•

6 0
3 years ago
Other questions:
  • What can be done to improve the security of business uses of the Internet? Give several examples of ecurity measures and technol
    9·1 answer
  • my airpods just do not seem to connect if i try to pair them, reset them, they have this continuous green light, please help me
    12·1 answer
  • cpp g Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print fo
    15·1 answer
  • Question #5
    14·1 answer
  • Temperature converter. This program should prompt the user for two arguments, first a decimal number and second, a single letter
    10·1 answer
  • Jose would like to have text with predefined styles that can flow around an image in a variety of shapes and sizes
    10·2 answers
  • Explain the term creating in word processing​
    12·1 answer
  • Which of the following is an example of group dynamics?
    8·1 answer
  • Consider the following statement: String myMiddleInitial = “h”;
    15·1 answer
  • Write a recursive function named canmakesum that takes a list of * integers and an integer target value (sum) and returns true i
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!