Blog Archives

♥ 6 Aspects that can motivate you to fast-track your career & go places as a software engineer

#1: Nitty-gritty reasons like insult, failure, professional embarrassment, and lack of respect. For example,  not getting the job you badly wanted,  being unemployed for a while, leaving a job in unpleasant circumstances, etc. There is no better way to get even with those caused this to you than proving yourself with a success.

Read more ›

00: 17 beginner Java interview questions and answers

These 17 beginner Java interview questions & answers are not only for the entry level job interviews, but also get a good grasp of the beginner level Java concepts.

Q1. Why use Java?
A1. Java is still a very popular language according to the TIOBE index,

Read more ›

01: Spring DI & IoC interview Q&As

Video: Spring DIP, DI, and IoC. This extends 13 Spring interview questions & answers.

Q1. What do you understand by the terms Dependency Inversion Principle (DIP), Dependency Injection (DI) and Inversion of Control (IoC) container?

Read more ›

02: Java Generics in no time “? extends” & “? super” explained with a diagram

Generics in Java can be be a bit tricky to get your head around. Hope the explanation below enhances your understanding of generics. This complements 5 Java generics interview Q&As with examples.

Plain old List, List <Object>, and List<?>

The plain old List: is a heterogeneous mixture or a mixed bag that contains elements of all types,

Read more ›

02: What is wrong with this code? Heap Vs Stack, Thread safety & Synchronized

This post covers must know Java Multithreading basics – Heap Vs Stack, Thread-safety & Synchronization. When you have a multithreaded Java application, you need to code in a thread-safe manner. Java interviewers may ask you to detect thread-safety issues as discussed in “What is wrong with this code?

Read more ›

03: ♦ Java autoboxing & unboxing benefits & caveats interview Q&As

Q1. What do you understand by the terms “autoboxing” and “autounboxing” in Java? A1. Java automatically converts a primitive type like “int” into corresponding wrapper object class Integer. This is known as the autoboxing. When it converts a wrapper object class Integer back to its primitive type “int”, … Read...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Quick-Brushup, 90-Day-Full-Access-Career-Companion, 180-Day-Full-Access-Career-Companion, 365-Day-Full-Access-Career-Companion and 2-Year-Full-Access-Career-Companion Free Trial | Log In | Register | Home

03: Identifying and fixing NonUniqueObjectException in Hibernate

NonUniqueObjectException is thrown when there is an object already associated with the session with the same id (primary key) (i.e. a duplicate). It is important to understand the concept of a “detached” object in Hibernate. This is one of the most common errors, understanding why and when this error is thrown will save you time in identifying and fixing this issue.

Read more ›

04: Identifying and fixing LazyInitializationException in Hibernate

LazyInitializationException is thrown when an object becomes detached, and if you try to access associated (i.e. proxied) object(s) of a detached object.

Q. What is a detached object in Hibernate?

When you close an individual Hibernate Session, the persistent objects you are working with are detached.

Read more ›

04: Merging Vs rebasing on Git questions and answers

Q1. What do you understand by the terms merging and rebasing? Can you explain both with a daiagram?
A1. Both of these commands are designed to integrate changes from one branch into another branch—they just do it in very different ways.

Read more ›

05: 12 things to know about Java (or any) job interviews

1. Interviews are not technical contests to see who gets the most number of questions right. so, don’t be overwhelmed by the number of Q&A on this site. 4 things to watch-out for are:

  • Getting through the initial telephonic & written/coding test screening,

Read more ›

05: Git & Maven for releasing software artifacts Q&A

Q1. What are the general steps involved in making a software release?

#1: Checking out the software artifacts to you build serevr or local box from a source control management (i.e. SCM) system.

#2: Giving it a version so it can be uniquely identifieds

#3: Building,

Read more ›

05: Overloaded methods Vs Generic methods in Java with JD-GUI & javap to look under the covers

In an earlier post we looked at Understanding Overriding, Hiding, and Overloading in Java?. We also discussed how “method overriding” gives polymorphism. In this post, let’s see how a “generic method” can replace a number of overloaded methods. Then see under the hood as to what happens to the compiled code.

Read more ›

06: HashMap & HashSet and how do they internally work? What is a hashing function?

HashMap & HashSet are not only one of the frequently used data structures, but also one of the popular interview topics.

Q1. How does a HashMap store data?
A1. As key/value pairs. You can store and retrieve values with the keys.

Read more ›

06: Java 8 way of File reading and functionally processing the data


#1 double colon notation ::

The new double colon (::) operator that Java 8 has to convert a normal method into lambda expression. So,

Instead of:

You can do:

#2 Why is stream::iterator used?

Read more ›

07: Java Iterable Vs Iterator differences and know how

Q1. What are the differences between Iterator<T> Vs Iterable<T>?
A1. The “Iterable” was introduced to be able to use in the “foreach” loop. A class implementing the Iterable interface can be iterated over. For example,

Hence, it can be used in the foreach loop

The Iterable interface has one method iterator()


Read more ›

14 Unix interview questions & answers for Java developers

Q1 How do you remove the Control-M characters from a file?
A1 Using the sed command that replaces Control-M with nothing

Note: The ^M is typed on the command line with ctrl+v and ctrl+M

Q2 How will you search for a property named “inbox”

Read more ›

14+ SQL interview Questions & Answers

SQL interview Questions & Answers is a must for any developer as all non-trivial applications need to talk to a database with CRUD operations. Q3 – Q15 are very popular with the interviewers. If you want to quickly practice your SQL skills try SQL Fiddle or install MySQL locally as shown in the ⏯ MySQL database beginner video tutorial.

Read more ›

16+ technical key areas to fast-track your Java career with increased earning potential

If you want to be a top-notch developer who goes places, then you must have a good handle on these 16+ technical key areas. Seasoned Java developers must have a solid understanding to “talk the talk & walk the walk” by asking the right questions.

Read more ›

3 reasons to become a Freelance Java Developer

This is mainly based on working as a freelance Java developer for a single client on a contractual basis like 6 to 24 months or longer, and not working on smaller jobs for multiple clients. Whilst there are premium Java freelancing sites like ““,

Read more ›

5 steps to become a contractor to gain professional & financial freedom

Anyone can become a contractor, but the hardest part of being a contractor is finding not just any freelancing jobs but rewarding & longer term development work and continuously finding them without any prolonged gaps.

You just can’t go to a freelance site like or and expect to pull jobs that will give you a steady and attractive income.

Read more ›

5 tips that will put your Java contracting career on auto-pilot mode

If you are already working as a Java freelancer/contractor or aspiring to become one, here are 5 tips that will put your freelancing career as a programmer on auto-pilot mode. Feel free to share your experience and tips as a freelancer. If you aspire to become a freelancer/contractor then read 5 steps to become a Java freelancer

3 key benefits of contracting/freelancing

1) Better income,

Read more ›

9 Tips to earn more as a Java developer

Not all jobs and titles are created equal. Why do person “X” and person “Y” performing similar tasks have a difference of 1.2 to 2.0 times in their remunerations? Why do low latency & big data jobs tend to pay more? Why are specialists get paid more than the generalists?

Read more ›

Are you reinventing yourself as a programmer?

“If you want something you’ve never had, you must be willing to do something you’venever done.

   — by Thomas Jefferson

Reinventing yourself is all about constantly embracing change. It also means being selfish and looking after yourself.

Read more ›

Beginner array coding problems in Java

More Data Structure and Algorithms Coding Questions and answers in Java.

Q1. Write a program that allows you to create an integer array of 5 elements with the following values: int numbers[ ]={5,2,4,3,1}. The program computes the sum of first 5 elements and stores them at element 6,

Read more ›

Choosing from multiple Java job offers – analytical approach

“chance favors the prepared mind” – Louis Pasteur

The top 4 career mistakes many make as a software developer are:

1) Stagnating in the same job without acquiring the much needed technical & soft skills. False sense of job security that the employer will look after me and staying too long in the comfort zone without expanding on the stack of technoligies will come back and bite you.

Read more ›

Creating a simple Java Web project with Maven – part 1

Java beginners to create a simple web application (i.e. a Web ARchive filei.e. a war file). Prerequisite is that you have set up Java, Maven, and Eclipse.

 Step 1: Execute the Maven maven-archetype-webapp command to create the Maven web structure with the following command on a DOS command prompt.

Read more ›

Didn’t get the job offers or raise you deserve as a Java developer?

Your CV didn’t get short listed; you didn’t get the job you hoped for; you didn’t get the raise you deserved. Don’t be afraid of failures because

“Edison failed 10, 000 times before he made the electric light. Do not be discouraged if you fail a few times.”

Read more ›

Is the effort you expend on Java certification worth the results?

If you expect to land your dream developer job simply by having a Java certification then it is probably a naive thinking. Preparing for the exam makes you learn the language basics, and keeps you motivated in getting the certification. The real world out there is quite different and requires the programmer mindset to solve problems and good career making skills to go places.

Read more ›

Java coding practice problems – prime and powerful

There is no other way to pass the Java coding tests other than practicing. I have failed Java coding tests due to lack of practice. How often do you get work with tree and graph data structures? Ho often do you work with algorithms?

50+ Java coding practice problems Links:

Can you write code in Java?

Read more ›

javap for debugging and better understanding some Java concepts with 3 practical examples

The javap is a class file dissembler. Here are 3 scenarios you can put javap to use with code examples.

#1 Finding the Java version of the class file within a jar

Extract a class file say “MyJobRunner.class” from a jar file and use javap to find out the version used

“major version: 51”

Read more ›

Key considerations in processing large files in Java

Q1. What are the key considerations in processing large files? A1. Before jumping into coding, get the requirements. #1 Trade-offs among CPU, Memory Usage & Disk I/O Processing a file involves reading from the disk, processing (e.g. parsing an XML and transforming), and writing back to the disk. … Read...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Quick-Brushup, 90-Day-Full-Access-Career-Companion, 180-Day-Full-Access-Career-Companion, 365-Day-Full-Access-Career-Companion and 2-Year-Full-Access-Career-Companion Free Trial | Log In | Register | Home

Part 1: Badly designed Java classes & interfaces

4 Part practical design concept series

Part 1: Abstraction | Part 2: Single Responsibility Principle | Part 3: Open Close Principle | Part 4: Dependency Inversion Principle.

Read more ›

Q1-Q10: Top 50+ Core Java interview questions & answers

These are must know Java interview FAQs. If you don’t get these Java interview questions right, you will not be getting an offer.

Q1. What is the difference between “==” and “equals(…)” in comparing Java String objects?
A1. When you use “==” (i.e.

Read more ›

Spring 3.0 tutorial – Part 1 (Setter DI )

This is a very simple Spring setter DI (depenendency injection tutorial). This assumes that you have gone through the “Setting up Java, Maven and Eclipse” tutorial. To recap:

1) Java, Maven, and eclipse are set up.
2) You have run the Maven archetype:generate command to create a skeleton structure.

Read more ›

Spring lookup-method example to inject prototype scoped bean into a singleton scoped bean

Step 1: You need asm and cgilib libraries in addition to Spring libraries shown below.


Step 2: define the Dao (Data Access Object) interface.

Step 3: Define the Dao implementation.

Read more ›

Unit Testing Data Access Logic in Java

Most interviewers like Java candidates those who are passionate and experienced about writing unit tests. Any non trivial Java application will be making calls to database tables. So, here are a few questions and answers testing your ability to write unit tests to test data access layer.


Read more ›

When to jump ship? Vs When to steady the ship?

“Love your job but don’t love your company, because you may not know when your company stops loving you.

   — by A. P. J. Abdul Kalam

One of the dilemmas many professionals face is when to jump ship?

Read more ›