Java

Iterator Design Pattern

By: Stephen Patrick | 12 Sep 2016 | Category: Java Iteration

Iterator Design Pattern

An iterator also known as an enumerator is a common design pattern. It is a data structure that is used to hide an underlying data structure and the interface used to process that data structure. An iterator provides a common interface to processing the elements of a data structure.

Read More

How To Create A Dependency Jar With Maven

By: Stephen Patrick | 20 May 2016 | Category: Maven

How To Create A Dependency Jar With Maven

We will quickly demonstrate how to build a dependency jar file using the Maven Assembly Plugin. This task is useful when you wish to ease deployment by packaging all the project dependencies with the project deliverable inside the jar file.

Read More

How To Disable Tests With Maven

By: Stephen Patrick | 08 Jun 2016 | Category: Maven

How To Disable Tests With Maven

As mentioned, maven is a java build and dependency management tool. As part of the build and packaging process Maven can run execute your Junit Tests. However, this behavior can be disabled

Read More

Java Overview

By: Stephen Patrick | 21 May 2016 | Category: Java Introduction

Java Overview

Java is a high level programming language that can be used for a wide variety of projects and tasks. Java was originally created developed at Sun Microsystems under the guidance of James Gosling. Java was designed to overcome some of the limitations and burdens of its predecessors while raising the level of abstraction that a software engineer works with when creating computer programs.

Read More

Java A First Example

By: Stephen Patrick | 21 May 2016 | Category: Java Introduction

Java A First Example

As with most introductory examples to a programming language we will start with the infamous “Hello World” example. This is normally a good way to ensure that your development environment is set up correctly and that you can compile and execute Java code.

Read More

Spring REST Introduction

By: Stephen Patrick | 24 Jun 2016 | Category: Spring REST

Spring REST Introduction

REST stands for Representational State Transfer and is an architectural style used for building web applications that is based on the technology of the Web. At the core of REST is the concept of a resource. We will build a very simple REST Service using the Spring Framework and Spring Boot. Spring Boot aims to simplify development with the Spring Framework. The first thing we need to do is configure Spring Boot.

Read More

Connect to Oracle with JDBC driver

By: Stephen Patrick | 09 Sep 2015 | Category: JDBC Quick Starts

Connect to Oracle with JDBC driver

Here we show an example of how to connect to A Oracle database using JDBC. To work along with this example you will need to download the Oracle driver.

Read More

Connect to PostgreSQL with JDBC driver

By: Stephen Patrick | 09 Sep 2015 | Category: JDBC Quick Starts

Connect to PostgreSQL with JDBC driver

Here we show an example of how to connect to A PostgreSQL database using JDBC. To work along with this example you will need to download the PostgreSQL driver.

Read More

Connect to MySQL with JDBC driver

By: Stephen Patrick | 09 Sep 2015 | Category: JDBC Quick Starts

Connect to MySQL with JDBC driver

Here we show an example of how to connect to A MySQL database using JDBC. To work along with this example you will need to download the MySQL driver.

Read More

Java Encoding

By: Stephen Patrick | 21 May 2016 | Category: Java Encoding

Java Encoding

Java is a universal Platform with the intention of executing on any device and support a broad spectrum of applications and languages. With this in mind the designers of the platform made a core decision on the type of encoding Java would support. To achieve this the designers decided to support Unicode character set.

Read More

Java Comments

By: Stephen Patrick | 21 May 2016 | Category: Java Comments

Java Comments

Java supports different types of comments. These include C-style block comments delimited by / and /and C++-style line comments indicated by//.

Read More

Javadoc Comments

By: Stephen Patrick | 22 May 2016 | Category: Java Comments

Javadoc Comments

Have you ever read the Java API documentation, if you have, you are familiar with Java documentation comments. Java Documentation comments are means for you to document your Java code.

Read More

Java Type System

By: Stephen Patrick | 22 May 2016 | Category: Java Type System

Java Type System

The type system of any programming language is the different types of data it can store. More specifically it gives labels to the different types of data elements, the range of values it can store, and the relationship between them. Programming languages can be generally divided into two different type systems.

Read More

Java Autoboxing

By: Stephen Patrick | 22 May 2016 | Category: Java Type System

Java Autoboxing

The Java Type System, can be divided into two main data types namely, primitive and reference types. Java is a rich type system and we normally create our own custom types (reference types) that extend from java.lang.Object.

Read More

Java Autoboxing Caveats

By: Stephen Patrick | 22 May 2016 | Category: Java Type System

Java Autoboxing Caveats

As we talked about Autoboxing and Unboxing were introduced into the Java Language in Java 1.5. Autoboxing and Unboxing provides Syntactic Sugar to the java language by automatically converting between primitive to reference type and vice a versa respectively.

Read More

Java Bitwise Operators

By: Stephen Patrick | 22 May 2016 | Category: Java Type System

Java Bitwise Operators

Bitwise operation is an operation that requires the operand(s) of the operation to be in binary format (bytes), and applies the operation one bit at a time. If you remember a byte is 8 bits, where a bit can have a value of 0 or 1.

Read More

Java BitShift Operators

By: Stephen Patrick | 22 May 2016 | Category: Java Type System

Java BitShift Operators

Bitshift operation is an operation that requires the operand(s) of the operation to be in binary format (bytes), and applies the operation one bit at a time. If you remember a byte is 8 bits, where a bit can have a value of 0 or 1.

Read More

Java Floating Point Precision Caveat

By: Stephen Patrick | 24 May 2016 | Category: Java Type System

Java Floating Point Precision Caveat

Out of the box two of Javas primitive types for representing decimal values are the types float and double. These types implement the IEEE Standard for Floating-Point Arithmetic (IEEE 754) specification. However using these types can lead to issues that you should be aware of.

Read More

Java Integer

By: Stephen Patrick | 24 May 2016 | Category: Java Type System

Java Integer

The Integer data type in Java belongs to the java.lang package. This package is indirectly imported by the Java compiler so you don't have to. Like other, numerical types the Integer class extends from the java.lang.Number class, which like every class in the Java ecosystem extends from java.lang Object.

Read More

Integer From String Examples

By: Stephen Patrick | 25 May 2016 | Category: Java Type System

Integer From String Examples

Here we will look at some more examples of the Integer Data Type and how to convert an integer from a string. The Integer data type in Java belongs to the java.lang package. This package is indirectly imported by the Java compiler so you don't have to. As mentioned in the previous article the integer type comes into two many forms the primitive int type and the reference type java.lang.Integer.

Read More

Popular Articles