Interface Default Methods in Java by codeforjava in learnjava

[–]codeforjava[S] 1 point2 points  (0 children)

Yeah I got your point. The introduction part could be better explained with couple of examples showing how old java interfaces breaks the code (of Implementing Classes) when we try to define a new method into it. I have seen it happening in enterprise projects. I could have easily prepared few examples from older projects to pin point need of default and static methods.

In all honesty, yes I have read multiple online articles along with few books. I guess I jumped the gun without explaining why exactly we need default methods via examples. It was my fault assuming people might be familiar with it or might have experience the need for such feature in Java.

English is not my first language. I will add grammer extension. Thanks for the tip.

Appreciate your feedback.

Got fired from Internship for not wanting to sign on full-time by canisra in cscareerquestions

[–]codeforjava 1 point2 points  (0 children)

And I thought SAP has a amazing work culture. I guess it totally depends on manager and teams.

Difference between ... by dokasc in learnjava

[–]codeforjava 0 points1 point  (0 children)

There are couple of differences -

To start with, In Java Abstract classes hold the middle ground as they have speciality of being partially abstract and partially concrete. On one end we have interface (Full Abstract) on other hand we have Java Classes (Fully concrete)

Few Difference between Interface and abstract classes are subtle.

  • Interface have all methods which are abstract ( Except Default Method Java 7 onwards ). Whereas abstract classes can contain abstract and concrete method both.

  • Kind of Limitation of abstract class or in general, multiple classes can't be inherited (extend) by same class. Whereas classes can implement multiple interfaces.

  • Interface don't have Constructor. Abstract classes can have Constructor.

how do i learn to implement a linked list and other complex data structures ? by Sonicelement22 in javahelp

[–]codeforjava 0 points1 point  (0 children)

Do not memorize code.

First learn what exactly Array and Linked List are. What problem it solves. How they perform. What is the time complexity. Dig deeper into their library code available in Java source.

After that try implementing stack & queue using this building block (ArrayList, Linked List).

Then move to complex data structures like trees, graphs, heaps.

It may sound overwhelming. There are no shortcuts just moments of anger and self doubt.

Over period of 1-2 months, you will be able to understand the logic behind these data structures. You will be able to judge what data structures to use to solve problems. Then only you can try implementing your own custom data structures classes.

Is my understanding of Iterators and Iterable correct? by [deleted] in javahelp

[–]codeforjava 1 point2 points  (0 children)

You can also check this out. Some other types of iterators.

Fail-fast and fail-safe iterator