Category: Java SE

Java SE tipps and triks

Java 8 – Reading a file as String

There are a lot of examples how to read a file content in Java 8. The most common one is

Use always a charset with String to Byte array transformations and vice versa...

Travelling salesman algorithm in Java Fork/Join Framework

CostX and CostY – are the axle weight. E.g .: maximum axis velocity of the robot. An edge is calculated by the TSPAction class. The recursive function returns no results , so TSPAction...

Directory stream with Java 8 lambda

Short snippet how to leave 100 newest text files in directory and delete others with help of Java 8 lambda.