Java – How-Tos and Tutorials

Java files - Basics: writing files - Feature image

Java files, part 2: How to write files quickly and easily

After the first part of the series was about reading files in Java, this second part introduces the corresponding methods for writing small and large files. The article addresses the following questions in detail: What is the easiest way to write a string or a list of strings to a text file? How to write

Read More »
Java files - Basics: reading files - Feature image

Java files, part 1: How to read files easily and fast

The packages and java.nio.file contain numerous classes for reading and writing files in Java. Since the introduction of the Java NIO.2 (New I/O) File API, it is easy to get lost – not only as a beginner. Since then, you can perform many file operations in several ways. This article series starts by introducing

Read More »
Convert int to String Java fastest method - feature image

How to convert int to String in Java – the fastest way

In this article, I show you how to convert an int into a String in Java the fastest way. The answer is probably surprising for some. I present four variants and measure and compare their speed using JMH microbenchmarks. I analyze the measurement results looking at the Java source code and also the generated bytecode.

Read More »
Monorepos - advantages and disadvantages - feature image

Monorepos – advantages and disadvantages

Originally I wanted to publish the third part of my article series about Static Code Analysis today. However, this part will be more extensive than the first two parts so that I couldn’t finish it in two weeks. Today I would like to share my experience with Git monorepos with you. There are many articles

Read More »
Write better code with static code analysis - feature image

How to write better code with Static Code Analyzers

Many years ago, when I thought – inexperienced and naive as I was – that I was a much better programmer than I was back then, someone asked me: “Sven, how many lines of code has your longest method?” Neither did I know the answer to the question, nor did I understand its background. Today

Read More »
How to write quality code and enforce Java code standards - feature image

How to write quality code and enforce Java code standards

Today is my last working day at AndroidPIT. After building AndroidPIT and developing it for ten years, a few months ago, I decided to start my own business as a freelance programmer to gain new experiences. After programming alone for a few months back in 2009, we started hiring additional programmers shortly after that. Working

Read More »