Java – Convert JavaBean Using XMLEncoder and XMLDecoder

This post shows how to use the Java classes XMLEncoder and XMLDecoder to convert JavaBean objects to XML and back. Note that they support the specifications for JavaBeans to make

Java 8 – Convert Iterator to Stream Using StreamSupport

Although not a common scenario, some libraries return Iterators instead of Stream or Collection objects. Why? Because they can. If the Java libraries you are using have methods that return

Avoid NullPointerException with Stream.ofNullable in Java 9

This post demonstrates how to avoid NullPointerException in Java 9 when working with Stream and using the overloaded of metho

Java – Create class constructor with fields faster in Eclipse

This post shows how to create a Java class constructor with fields faster in Eclipse. Before the advent of smart IDEs, Java developers write out almost all codes as it

C# – Check if key exists using these Dictionary Methods

A well-rounded software developer could easily switch between programming languages. Besides, full-stack developers do this already. They have skills for both backend and frontend. Therefore, we should learn another language

Ruby – How to create a Class and its Object

This post shows Ruby codes that create a simple class and objects from that class. Yes, Ruby is an old and weird programming language, but people and companies are still

Java – Where can we place the public static void main method?

Many Java programmers are only familiar with having the public static void main in a class to start the application. However, there are other places where we can define this

Java – How to skip and not execute the finally clause

They say that when an Exception occurs, the finally clause, if available, will always execute no matter except for one thing.

How to block port using Ruby for testing purposes

This post is about using a port so that other applications will not use it in test scenarios. For instance, you have some tests that use a mock web service,

Three Ways To Check if key exists in Map in Kotlin

This post shows how to check if a key exists in a Map in Kotlin. There are three ways to do this in Kotlin. Note that we are using Kotlin