Skip to content

Development

D3.js getting started: a first tutorial

D3.js (Data-Driver Documents) is an Open-Source JavaScript library for manipulating DOM elements based on data. D3 makes use of the standards SVG, HTML5, and CSS.

It is good at creating charts, maps, or any other visual representations of data. D3.js allows great control over the final visual result, at the cost of a steep learning curve.

Some concepts must be understood before using this powerful library. That is the exact purpose of this blog post: help you to get started with D3 code samples and animated graphics.

Java - 10+ Amazing Ways to Write to File

It's surprising to see how many different ways exist to write a File in Java! It can be quite confusing... This is why we made this tutorial. We'll explore the different ways, the best practices involved as well as the common pitfalls.

If you're wondering how to write text or binary data in a File, you're in the right place!

Java Arrays

You're probably not the first one to wonder how arrays work in Java. And you haven't found a clear answer yet! I have some good news... This post is all about understand how arrays work, how to create them, how to store data and much more. I promise, you won't be disappointed!

Let's dive into the world of those mysterious arrays!

What is an Array

Java Array

Java Arrays are part of primitive types. It means an array is part of the language syntax, not a class.

An Array data structure consists of a collection of elements stored sequentially and accessible through an index (usually an integer).

Java ArrayList

I guess you're here because you want to learn how to use the ArrayList in your Java code. You're in the right place!

As explained in the Java documentation, ArrayList is:

  • A resizable array: implementing the List interface,
  • Mutable: objects can be added and/or removed,
  • Not Thread-safe: ArrayList is not suitable for concurrent access. See Thread Safety for more information.

Let's explore how to use an ArrayList through simple code examples!

How Array List Works

Dynamic Array

Java LinkedList

The question which often arises is: are LinkedList preferable to ArrayList? In which case should I use it?

As explained in the Java documentation, LinkedList is:

  • A doubly-linked chain: elements are stored in nodes, with linking back and forth between themselves,
  • Mutable: objects can be added and/or removed,
  • Not Thread-safe: LinkedList is not suitable for concurrent access. See Thread Safety for more information.

Let's explore how to use a LinkedList through simple code examples! And find out when a LinkedList instead of an ArrayList should be used.