Implementation detail

Hi, I am currently rewatching the second part of Mastering Java and I came across the word implementation detail a few times. I was wondering if anyone could explain its meaning and what it does. Thanks in advance. :smiley:

That’s a good question. I think “implementation detail” just means “how something is coded/implemented”. But I usually hear it in sentences like “this is using a linked list under the hood, but that’s just an implementation detail”, meaning it’s not really that important to the conversation to know exactly how it is implemented.

1 Like

An important distinction about an “implementation detail” is that it could change in the future. So the user of some class does not (or rather should not) care about an implementation detail because it should be completely hidden by good encapsulation. A future version of the class could do something completely different (after some refactoring) and the class should still “work” as intended.

1 Like