What is an Operand Stack in Java

0 votes
Please help me understand what is Operand stack in Java and how does it work? Your help will be appreciated.
Mar 6, 2019 in Java by Prachi
1,893 views

1 answer to this question.

0 votes

The basic utility of Operand Stack are as follows:

  • JVM uses operand stack as a work space like rough work. We can say for storing all the intermediate calculation’s result. Like we use a rough sheet to do our calculation.
  • Operand stack can also be looked as organized array of words like local variable array. Then again there is a catch, this is not accessed by using index like local variable array does, rather it is accessed by some instructions that can push and pop values to and from operand stack and perform required operations.
This is the use of Operand Stack in JVM. To visualize it better, think of a stack and imagine push and pop operation. In the push and pop operation instead of number or string there are instructions. That's Operand Stack.
answered Mar 7, 2019 by Priyaj
• 58,020 points

Related Questions In Java

+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,220 points
3,585 views
0 votes
1 answer

What is an efficient way to implement a singleton pattern in Java?

Use an enum: public enum Foo { ...READ MORE

answered Jul 6, 2018 in Java by Akrati
• 3,190 points
959 views
0 votes
2 answers

In Java, what is the best way to determine the size of an object?

I happened to find a java class "jdk.nashorn.internal.ir.debug.ObjectSizeCalculator", ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 59,230 points
13,075 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,140 points
4,106 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,240 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,363 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points
17,438 views
0 votes
1 answer

Selenium JARS(Java) missing from downloadable link

Nothing to worry about here. In the ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points

edited Aug 4, 2023 by Khan Sarfaraz 4,880 views
+1 vote
7 answers

What is difference between access modifier and access specifier in java

Access Specifier:- This can be understood as ...READ MORE

answered Feb 14, 2019 in Java by Priyaj
• 58,020 points
70,907 views
+1 vote
2 answers

What is an Object?

Hey @preetiagarwal, your description is an answer ...READ MORE

answered Dec 24, 2018 in Java by Priyaj
• 58,020 points
1,352 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP