Java Run Sudo Command on Remote Linux Host

It turns out that to run sudo command on remote Linux machine via your Java code is a tricky task. The problem is that when you connect to the machine and...

Creating Simple RESTful Service in Kotlin and Spring Boot

Today you'll see how to create a simple RESTful web service using Kotlin and Spring Boot. This article is adapted for those who are not familiar with Kotlin and Spring Boot...

Java Stream API groupingBy examples

For inexperienced developer usually it is hard to imagine the real benefit of using Java Stream API instead of regular for/foreach cycles. Today I'll show several examples that will help you significantly...

Java Dependency Injection Simple Example

Today we'll see a simple code that shows what actually Dependency Injection is. Imaging that you have Student class, and several different loggers for this class. Each logger prints messages in his own...

Java Get Fibonacci Number by Index

Fibonacci sequence is a sequence of integers where every number after the first two is the sum of the two preceding ones. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,...

Java Get EC2 Private/Public IP and Instance ID

Imagine your have your Java application running on AWS EC2 and you want to get know your EC2 instance ID or EC2 private or public IP directly from your Java code....