Freelance Java Developer

Tips for hiring and 5 challenging java questions even seasoned developers might struggle with.
While it may be true that experience is the best teacher, having a seasoned individual with years of experience may not always reflect his skills and competence in the field. Some stay in the field for numerous years but never move up due to deficiency in terms of motivation, willingness to learn or brainpower. Be a bit smarter with your hiring efforts and learn more about how much value they can bring to your company.

Tips for hiring an experienced Java engineer

Finding new talent is not easy, the choice of the candidate depends largely on your business needs regarding future development projects. Hiring a Java developer is a high priority for many organisations, as the programming language continues to play a dominant role in enterprise software development. To help you dig up the information you need to make the best hiring decision, we put together some top tips for interviewing your next potential Java engineer.

View their work history, information about previous jobs, positions, responsibilities.

Experience in different companies in different positions speaks of the theoretical knowledge and practical skills of a specialist, what he has done more than once and will be able to repeat it. Work experience shows the career growth of a specialist, their achievements and professional successes.

See their references and testimonials

References and testimonials of an engineer show their strengths, skills, and knowledge for which they were valued in previous work. It is also a good option to get acquainted with a candidate’s GitHub profile, as programmers often evaluate each other’s work using GitHub ratings.

Contact with previous clients

By contacting previous clients, you can find out a lot of important information about an engineer’s communicative skills, analytical thinking, problem-solving ability and responsibility for the tasks.
Experienced freelance developers are bound to have feedback from previous clients or even testimonials from fellow developers.

Get another senior Java developer to interview them

A professional Java developer will be able to accurately evaluate a candidate’s skills and knowledge, validate or refute their resume skills, conclude on the candidate, and give true feedback.

Give them a problem-solving challenge, test brain power

By looking only at the resume, it is not possible to determine how a person copes with different assignments. There is a test task for this. In order not to scare away the candidate, make it small (lead time: 15 minutes – 4 hours), but capacious. This will help to see the applicant in work, evaluate the quality of the final product and the degree of creativity of the approach.

Test their skills by live coding

Live coding is another way you can assess the technical knowledge of a developer, and it also provides an excellent opportunity to introduce them to the rest of your business. Offering your chosen candidate a chance to see the way your company does things will allow you to see if they have the skills to keep up with the rest of the team.

Check if they have relevant experience from your industry

When committing to the development of any piece of software, you will need to choose a Java developer who is not only familiar with your development methodology, but can also navigate the process you follow. Finding out which development processes a candidate is familiar with should be a key part of the interview scenario. Most will only have used one during their career. By discovering what they favour, it will help you decide if they fit your current business development style.

Why not only years of experience matter

Communication skills are critical in nearly every role, particularly in those surrounding development. Senior Java developers not only have to interact with members of their team, but also with stakeholders, who may not fully understand what technology can do and whether a particular result is plausible.

The ability to speak technically with peers and breakdown complex topics for less tech-savvy stakeholders are equally essential. Additionally, you need to be able to convey your thoughts verbally and in writing, ensuring you can participate in discussions wherever they occur.

Persistence When Problem-Solving. While some problems are fairly easy to solve, many senior Java developers will encounter issues that require deep dives into the code and a lot of diligence to resolve. Without persistence, you may become frustrated with the task, especially since it demands a lot of concentration on your part.
Determine his level of interest in the industry through this talk because their passion for learning speaks a lot about his capabilities as well.

5 challenging Java questions even seasoned developers might struggle with

The next time you employ a freelance Java developer, try asking them the following questions that will rattle up their minds. Those are exactly the questions we ask at DevsData. They will help you filter out your pool of candidates by half and leave you with a handful of top of the line developers.

1. ArrayList, LinkedList, and Vector are all implementations of the List interface. Which of them is most efficient for adding and removing elements from the list? Explain your answer, including any other alternatives you may be aware of.

Of the three, LinkedList is generally going to give you the best performance. Here is why:

ArrayList and Vector each use an array to store the elements of the list. As a result, when an element is inserted into (or removed from) the middle of the list, the elements that follow must all be shifted accordingly. Vector is synchronized, so if a thread-safe implementation is not needed, it is recommended to use ArrayList rather than Vector.

LinkedList, on the other hand, is implemented using a doubly-linked list. As a result, inserting or removing an element only requires updating the links that immediately precede and follow the element being inserted or removed.

However, it is worth noting that if performance is that critical, it is better to just use an array and manage it yourself, or use one of the high performing 3rd party packages such as Trove or HPPC.

2. Why would it be more secure to store sensitive data (such as a password, social security number, etc.) in a character array rather than in a String?

In Java, Strings are immutable and are stored in the String pool. Meaning that, once a String is created, it stays in the pool in memory until being garbage collected. Therefore, even after you are done processing the string value (e.g., the password), it remains available in memory for an indeterminate period of time thereafter (again, until being garbage collected) which you have no real control over. Therefore, anyone having access to a memory dump can potentially extract the sensitive data and exploit it.

In contrast, if you use a mutable object like a character array, for example, to store the value, you can set it to blank once you are done with it with confidence that it will no longer be retained in memory.

3. What does it mean for a collection to be “backed by” another? Give an example of when this property is useful.

If a collection backs another, it means that changes in one are reflected in the other and vice-versa. For example, suppose we want to create a whitelist function that removes invalid keys from a Map. This can be achieved far easier with Map.keySet, which returns a set of keys backed by the original map. When we remove keys from the key set, they are also removed from the backing map:

public static <K, V> Map<K, V> whitelist(Map<K, V> map, K... allowedKeys) {

            Map<K, V> copy = new HashMap<>(map);


            return copy;


retainAll writes through to the backing map, and allows us to easily implement something that would otherwise require iterating over the entries in the input map, comparing them against allowedKey, etcetera.

Note that it is important to consult the documentation of the backing collection to see which modifications will successfully write through. In the example above, map.keySet().add(value) would fail, because we cannot add a key to the backing map without a value.

Do not forget to evaluate the quality of work that the freelancer dished out during the exams. Analyze his degree of creativity and approach towards the situation.

4. Describe and compare fail-fast and fail-safe iterators. Give examples.

The main distinction between fail-fast and fail-safe iterators is whether or not the collection can be modified while it is being iterated. Fail-safe iterators allow this, fail-fast iterators do not.

  • Fail-fast iterators operate directly on the collection itself. During iteration, fail-fast iterators fail as soon as they realize that the collection has been modified (i.e., upon realizing that a member has been added, modified, or removed) and will throw a ConcurrentModificationException. Some examples include ArrayList, HashSet, and HashMap (most JDK1.4 collections are implemented to be fail-fast).
  • Fail-safe iterates operate on a cloned copy of the collection and therefore do not throw an exception if the collection is modified during iteration. Examples would include iterators returned by ConcurrentHashMap or CopyOnWriteArrayList

5. What is the volatile keyword? How and why would you use it?

In Java, each thread has its own stack, including its own copy of variables it can access. When the thread is created, it copies the value of all accessible variables into its own stack. The volatile keyword basically says to the JVM “Warning, this variable may be modified in another Thread”.

In all versions of Java, the volatile keyword guarantees global ordering on reads and writes to a variable. This implies that every thread accessing a volatile field will read the variable’s current value instead of (potentially) using a cached value. In Java 5 or later, volatile reads and writes establish a happens-before relationship, much like acquiring and releasing a mutex.

Using volatile may be faster than a lock, but it will not work in some situations. The range of situations in which volatile is effective was expanded in Java 5; in particular, double-checked locking now works correctly. The volatile keyword is also useful for 64-bit types like long and double since they are written in two operations. Without the “volatile” keyword you risk stale or invalid values.

One common example for using volatile is for a flag to terminate a thread. If you have started a thread, and you want to be able to safely interrupt it from a different thread, you can have the thread periodically check a flag (i.e., to stop it, set the flag to true). By making the flag volatile, you can ensure that the thread that is checking its value will see that it has been set to true without even having to use a synchronized block. For example:

public class Foo extends Thread {

    private volatile boolean close = false;

    public void run() {

        while(!close) {

            // do work



    public void close() {

        close = true;

        // interrupt here if needed




Hiring the best Java developers is not a piece of cake. It requires you to devote a lot of time and effort to select the best candidates from the vast pool of talents. We hope that the above guidelines will help you streamline the entire process so that you end up with the best specialists working for you.

Thank you

We'll get back to you as soon as possible.

Got a project idea?

Fill in an enquiry form and we’ll get back to you as soon as possible.


Unbeatable tech experience

“I interviewed about a dozen different firms. DevsData LLC is truly exceptional – their backend developers are some of the best I’ve ever worked with. I’ve worked with a lot of very well-qualified developers, locally in San Francisco, and remotely, so that is not a compliment I offer lightly. Their depth of knowledge and their ability to get things done quickly.
Nicholas Johnson