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
Novay_Z [31]
3 years ago
14

Need help writing a program that reads a string if the option "E" (enter a string) is chosen, and checks if parentheses (), brac

kets [], and braces {} are matched in a given string.
Implement this method using a Stack from java.util package.

You can use the string "A" as a token for parentheses, "B" as a token for brackets, "C" as a token for braces.

When an opening parenthesis is read, push the token "A", and when a closing parenthesis is read, pop the token "A" if available.
A similar operation can be done for others. Only if the stack is empty when you finish reading all characters of the string, you can confirm that everything was matched. Otherwise, the method needs to return an appropriate message stated above.
Computers and Technology
1 answer:
allsm [11]3 years ago
4 0

Answer:

is this even a question?...

You might be interested in
How do buffers work?
sasho [114]
A buffer is able to resist pH change because the two components (conjugate acid and conjugate base) are both present in appreciable amounts at equilibrium and are able to neutralize small amounts of other acids and bases (in the form of H3O+ and OH-) when the are added to the solution.
5 0
3 years ago
I found a random Nether Portal in my Minecraft Singleplayer world. Why is it there?
Mkey [24]

Answer:

This is a known bug in earlier versions of the game.

Explanation:

An easy way to solve this that I have seen work before is to completely destroy the 'new' portal that appears in the overworld. Once done, you should be able to enter your portal and exit from the same portal.

To help avoid this, you should also never install a portal in your world in an area that is at all enclosed. The portal system seems to dislike portals appearing in places they should 'not be' based on the initial construction of the world.

Also avoid dying, as it can cause random nether portals to form in parts of your world.

6 0
3 years ago
Read 2 more answers
The system tray contains _____.
MAXImum [283]
The operating system
8 0
4 years ago
Read 2 more answers
Lisa adds her co-worker Renald to a meeting and removes her secretary Olivia from the meeting. What will happen as a result?
VARVARA [1.3K]
There will be 1 person going, and there will be no secretary at the meeting
5 0
3 years ago
Read 2 more answers
If a user’s current directory is /home/mary/project1, which command could she use to move to the etc directory directly under th
kykrilka [37]

Answer:

Option 4 is the correct answer to the above question.

Explanation:

In the Linux operating system, The etc folder is listed on the root directory. When any user wants to go in the root directory of the Linux operating system from anywhere, then he needs to follow the command of the name of the folder where he wants to go with the '/' symbols. The above question states that the user wants to go to the etc folder of the root directory, then he needs to press the command '/etc' with the help of cd command because cd command is used to open any folder. So the option 4 is the correct, while the other is not because--

  • Option 1 states about cd which gives the error.
  • Option 2 states about cd /home/mary/etc which take the user to the etc folder which is in the mary folder.
  • Option 3 states about the cd etc which is used to take the user on the etc folder which is in the current folder.
  • Option 5 states about the cd\etc which gives the error.
8 0
3 years ago
Other questions:
  • Changeover means that ____. (select all that apply)
    7·2 answers
  • Paying attention to the trends that might impact your future career is called
    15·2 answers
  • Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the pop
    7·1 answer
  • Can anyone help me<br> I will make you a brainalist
    13·1 answer
  • Your friend Rebecca called because she is working on a budget and needs help with the AutoSum feature. She thinks AutoSum will b
    8·1 answer
  • Which of the following statements is false? a. As of Java SE 8, any interface containing only one method is known as a functiona
    6·1 answer
  • Assignment 4: Evens and Odds
    9·1 answer
  • if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
    7·1 answer
  • Who tryna trade in gta my psn is xMadOrNawx-_-
    11·2 answers
  • the implications your organization of providing email facilities to individuals in the workplace in terms of security and virus
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!