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