Search Engine Optimization is another kind of programming. Until and unless your web page features relevant keywords, mobile friendly interface and minimum security features across the website – your chances for desired results are none. If you want to get better rankings on Google in the year 2018, you need to follow certain measures. This blog is a complete guide for you to be able to do so.
And interfaces can have default methods. And that means that enums with a similar use can avoid copy-pasting code, by implementing the appropriate interface.
I love enums. They're a great tool for ensuring something exists exactly once, but maybe it has a few brothers and sisters.
What I hate about enums is that Java refuses to let us subclass them, and refuses to let us inherit from a class of our own choice, because it already inherits from a class by design, and Java refuses to allow multiple inheritance.
The pain is great and has led to duplicate code in my past.
Until today. Because today I learned from people on StackOverflow that enums can implement interfaces.
I should have realized that years ago. But I'm happy to know it now, and I hope some of you will be helped by this, as well.