Java AWS Interview Questions:

Vikas Taank
7 min readApr 20, 2024

Question: What is Meta Space in Java.

Answer: Metaspace is a native (as in: off-heap) memory manager in the hotspot. It is used to manage memory for class metadata. Class metadata are allocated when classes are loaded. Earlier the Class loading mechanism used the permanent generation known as PermGen space however that has been made redundant with Java 8. Metaspace lies in the native memory and non on the heap however PermGen resides on Heap. Please refer to this for more information.

How was the internal implementation of Java Hash Map changed with JDK 1.8?

Answer: Since Java 8 the internals of HashMap changed in such a way that if , in case of collisions , the size of the linked list is more than 8 , Java iternally make use of Red black trees to store the elements instead of linked list. This make sure that the get operation are O(log(n)) instead of O(n).

How streams are different from collections?

Answer: This could be a very big answer however there are couple of facts that you need to know about streams.

Streams operation do not modify the underlying collection however they apply the filter and ma…

--

--

Vikas Taank

I am new to Medium, trying to articulate my learnings so far . Please Join medium to read my articles. Please support- https://ko-fi.com/vikastaank