Tag: Java

Sorting an ArrayList is a common task in Java development. ArrayList is one of the most commonly used collection classes of the Java Collection Framework. Java provides a number of different ways to sort ArrayLists. In this post, we’ll explore the different ways to sort ArrayLists, and review best practices you should keep in mind. […]Continue reading

As a Java programmer, you will often need to work with date and time. In this post, we will learn how to get the current time of the day in Java applications. In Java, there are several ways for this and the primary classes that programmers typically use are the Date and Calendar classes. You can use both […]Continue reading

I was recently asked on my Facebook page, “How do I become a Java Web Developer?” There is  really no simple answer for this question. There are many facets to becoming a Java web developer. I’ve encountered Java developers who were good front end developers, or good backend developers. By ‘front end’, I mean more of […]Continue reading

In the first part of the series on unit testing with JUnit, we looked at creating unit tests both using Maven and IntelliJ. In this post, we will look at some core unit testing concepts and apply those using JUnit constructs. We will learn about assertions, JUnit 4 annotations, and test suites. JUnit Assertions Assertions, […]Continue reading

Unit testing is the first level of testing software where you write test code that executes a specific functionality in the code to be tested. In most cases, you as a programmer are responsible to deliver unit tested code. The objective is to check if the unit of the software, for example a public method […]Continue reading

Polyglot Programming Is the practice of programming in multiple programming languages. According to Wikipedia it is – In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it. In […]Continue reading

Object-oriented hierarchy may seem like a simple concept to grasp, since there are so many examples in life to illustrate it. This is not completely wrong. The basic idea behind object-oriented programming is simple. However, the problem is that there are certain details, finesses and tricky situations, that may not be obvious but demand a […]Continue reading

People expect computer programs to be accurate and precise when calculating numbers, and especially programs that perform monetary calculations and as a Java developer, sooner or later you will need to deal with monetary calculations. You may be tempted to use the primitive types of float or double for non-integer numbers. Both of these types support numbers with decimals. […]Continue reading