answersLogoWhite

0

You would need an array to store the actual stack. Better use an ArrayList or some other structure that you can redimension. You'll also need a variable to point to the "top of stack" - the last element added, which is the first element to be taken away.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Can we add website link when we write java program?

yes ,i can add the website link in java program when we write.


Write a program in C language to implement the apriori algorithm?

JavaScript is one program that has been written in C to implement the Apriori algorithm. There are also several other known programs available on the Internet that implement it as well.


How to write a java program that determines the number of prime numbers less than N which is given by the user?

where to start? do you have an algorithm and just want to implement it in java? depends on how big N is, as that will determine which method is most efficient


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Can you provide a solution to the diamond-square algorithm using Java and recursion?

Yes. It is possible to provide a solution to the diamond-square algorithm using Java and recursion.


What is javadoc?

write a java program to display "Welcome Java" and list its execution steps.


How write new line program in java?

\n


Is it possible to run java program without JVM?

No. Java programs run in the Java Virtual Machine (JVM) - without it your computer won't know how to handle Java bytecode.


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.


How java is 100 percent Internet based?

It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.


How do you write a Java program to implement weighted queue using circular doubly linked list?

Add weights to the elements of the queue and use an algorithm to sort the queue every time an element is added.


Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java