Article

Interview Questions for an Intermediate Java Developer

Looking for real life interview questions for a Java Developer? These are the ones from the one I have conducted recently. The length of the interview was limited to an hour. B = BeginnerI = IntermediateA = AdvancedIntroduction-Introducing him and what he has done + his experience Technical questions: OOP related questions1-What are the OOP’s… Continue reading Interview Questions for an Intermediate Java Developer

Article

An effective way of overriding hashCode() in Java

HashCodeBuilder This class enables a good hashCode method to be built for any class. It follows the rules laid out in the book Effective Java by Joshua Bloch.  Shall I say any more? This is from Apache Commons. It is using the Builder Design Pattern. Comparison between Apache Commons and Guava implementation of HashCodeBuilder can… Continue reading An effective way of overriding hashCode() in Java

News

Oracle Coherence 3.6: Share and Manage Data In Clusters

I attended and successfully completed “Oracle Coherence 3.6: Share and Manage Data In Clusters” course offered by Red Hat in December 2013. Oracle Coherence 3.6: Share and Manage Data In Clusters – Certificate Oracle Coherence 3.6: Share and Manage Data In Clusters – Course The topics covered in this course were as follow: What is… Continue reading Oracle Coherence 3.6: Share and Manage Data In Clusters

Article

EasyMock Notes

EasyMock utilize several methods to configure a Mock object. The expect() method tells EasyMock to simulate a method with certain arguments. The andReturn() method defines the return value of this method for the specified method parameters. The times() method defines how often the Mock object will be called. // setup the mock objectexpect(calcMethod.calc(Position.BOSS)).andReturn(70000.0).times(2);expect(calcMethod.calc(Position.PROGRAMMER)).andReturn(50000.0);// Setup is… Continue reading EasyMock Notes

Article

Simple Wait / Notify Thread Example

This is a simple Wait / Notify example. I am utilizing an Object for synchronization purpose. You can synchronize on This or any other object. However, a dedicated object that you use only for synchronization will give you a better understanding of code and eases debugging. package com.sheidaei.sampleThread; /** * Created with IntelliJ IDEA. * User: shahin *… Continue reading Simple Wait / Notify Thread Example

Article

How to remotely debug your java application on a Linux/Mac?

What you need Eclipse Tomcat Terminal What you have to do Setting up environment First of all you have to add the following lines to your .bash_profile (or .bashrc? what do you think? in mac .bash_profile, in linux .bashrc) export JPDA_ADDRESS=8000 export JPDA_TRANSPORT=dt_socket (You can change the port 8000 to the port of your choice). … Continue reading How to remotely debug your java application on a Linux/Mac?

Article

Remote development vs. remote debugging

Remote debugging (on a server) Remote debugging is not rocket science (unless you are debugging remotely on a spacecraft or something like that!). I am confident any experienced developer, who has worked with different application / container servers, is familiar with remote debugging and at least tried it once.Each developer might have his/her own definition of what… Continue reading Remote development vs. remote debugging

Article

Eclipse Project Red Exclamation Mark

This is something bothering me for a long time. I was working in a project dealing with several dependencies. After some reboots I got an exclamation mark next to the java project, like this one. There are no notes or suggestions on what is going wrong. Cleaning the projects won’t work either. After some research, I have figured… Continue reading Eclipse Project Red Exclamation Mark