I read Bill Venner’s excellent Inside the Java Virtual Machine book, which, in Chapter 5 explores in detail, among other things, the composition of a JVM’s stack frame. (This chapter from the book also happens to be officially published here: https://www.artima.com/insidejvm/ed2/jvm8.html) Apart from this book I studied relatively much the runtime data areas of some JVM’s, especially their stack and
Tag: stack
Stack in Java not being able to print in specific order
Currently I’m working on a project that is supposed to be a reverse word guessing game. This is how it should work: The use keeps guessing the word until it is fully spelled out. If the user guesses the letter correctly it is revealed if not it is still reveled as shown below ⚠️ Currently I have a stack containing
java: incompatible types: T cannot be converted to java.lang.String
I am currently working on a encryption and decryption service for my application, using Google Tink. The problem is the following: I want to program it without using (nearly) duplicate code and therefore I had the idea of using generics. If parsing the Strings to a byte[] is the only option I will be doing that, but I’d rather not.
arrayImpOfStack.java how to reverse number in output?
I need to write arrayImpOfStack.java then write a main method to read a sequence of numbers and using the stack operation print them in reverse order How to reverse number in output ? I have 2 class …
Not displaying elements from stack
So I have written this JAVA-program for stack and the problem is I cant display the elements using the display() method which I used in the code. here is my Stack class. public class Stack { //members …
Is this a stack?
Is this code a stack? How I can make it better? This is my first one. Can i do this using ArrayList? I didn’t added the isEmpty() method. Answer Yes, it is. But you can add checking for overflow, underflow. And this will be better if you’ll try using collections.