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
mr Goodwill [35]
4 years ago
10

What are the advantages of the java.util.Stack implementation of a stack?

Computers and Technology
1 answer:
klemol [59]4 years ago
3 0

Explanation:

The advantages of java.util.Stack are as following:-

  1. java.util.Stack is an implementation of the vector class hence it can keep track of position of elements in the stack hence it is not required to store an additional pointer for each node.
  2. In the implementation it allocates space only that much is needed.

These are the two advantages of java.util.Stack.

You might be interested in
A _____ movement tries to improve a part of society, usually through legal methods.
arlik [135]

Answer:

Don’t know lol but look it up on g00gle and she will have the answr

Explanation:

3 0
3 years ago
Read 2 more answers
The difference between a want and a need is a want is not necessary for survival. Things necessary for survival are known as ___
Zarrin [17]
A.Needs since they are necessary and needed for survival 
8 0
3 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
4 years ago
Read 2 more answers
Please help i only have 20 minuets
Ann [662]

Answer:

Newton's first law states that an object will stay at rest or be in motion, unless an unbalanced force acts on it.

7 0
3 years ago
A person with no postsecondary education is most likely qualified for a career as?
Schach [20]

Answer:

Municipal Clerk

Explanation:

3 0
3 years ago
Other questions:
  • When operating a computer, a user interacts with
    14·2 answers
  • How to change font size and style and add a table when creating a webpage?
    6·1 answer
  • Please help me!! 10 Points are waiting!!
    8·1 answer
  • When using a line graph, why is it important to only graph 1-3 series of data?
    14·1 answer
  • Given input of a number, display that number of spaces followed by an asterisk. (1 point) Write your solution within the existin
    15·1 answer
  • Deciding whether to explode a process further or determine that it is a functional primitive is a matter of experience, judgment
    8·1 answer
  • . what action does the following a default operator perform? int a, b, c; a = b + c;
    14·1 answer
  • Write a function named word_count that accepts a string as its parameter and returns the number of words in the string. A word i
    10·1 answer
  • Which two tools used for incident detection can be used to detect anomalous behavior, to detect command and control traffic, and
    13·1 answer
  • Compter History Large Resume Include: the beginnings of the computer and its development during the years The events of computer
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!