Tuesday, January 8, 2019

Monday, December 17, 2018

Java Developer interview questions.

I decided to make a compilation of possible interview questions for Java developers. I personally don't really like when in interviews this kind of academically oriented questions appear but unfortunately not every company does live coding exercises.

Hopefully this blog post will be useful as a mind refreshing tool when going to one of those interviews where the interviewer reads questions from a script(sometimes managers or semi-technical tech leads, etc ...) and you have to explain technical things with your own words. 

This compilation are real questions that can appear and they did in fact appear in interviews I've been in, at some point in my career. I will try to include more questions to this video in the future as I remember them.

What is the equals and hashcode contract in Java?


What is the difference between an ArrayList and a Linked list?


What is the final keyword in java and where it can be used?

Can you describe the inner workings of a Java HashMap?


What is "try with resources" in Java? 


Do you know what "volatile" is?


Can you write code to check if a String is a Palindrome?


How can you reverse a String using Java?


How can you reverse an Integer using Java?






Java 8 Refactoring Part 5: Improving enum with a BiFunction

This is the last refactoring that Victor Rentea did in the devoxx conference in London. He used a BiFunction to be able to provide more flexibility to an Enum. A very interesting refactor.



Thursday, December 13, 2018

Java 8 Refactoring Part 4: Composition Over Inheritance using the Loan Design Pattern

The Loan design pattern is a pattern that follows the principle of favouring composition over inheritance. It was explained in the Devoxx conference in London.



Wednesday, December 12, 2018

Java 8 Refactoring Part 3: Removing null checks and introducing Optional

The Optional feature of Java 8 it's very powerful it can prevent lot's of bugs and also make our code look more tidy. In this video I show an example which is very similar to the one presented at Devoxx London in 2018 by V. Rentea


Sunday, December 9, 2018

Java 8 Refactoring Part 2: Stream Wrecks

A stream wreck is a complex concatenation of streams that tries to provide some results in a one-liner. One-liners are good but concatenation of Streams is not good since makes the code quite difficult to follow. To fix stream wrecks we need to extract methods, local variables or classes in order to be able to improve the readability of the code.


Saturday, December 8, 2018

Java 8 Refactoring Part 1: Extracting Anonymous function to it's own class

In this video I mimic the first of the design patterns presented by Victor Rentea in the Devoxx conference in London in 2018.


Perhaps worth mentioning that the advantages of extracting anonymous functions into separate classes are:

- better readability of the code
- code easier to test
- more maintainable code

Share with your friends