Java

Default methods in Java interfaces

February 20, 2016 Java 3 comments

Java 8 default methods in interfaces

Java 8 implemented a new type of method into interfaces, called default methods. Default methods in Java interfaces allow to create methods with body, which classes can either choose to inherit or extend. In this article, I am explaining how to use default methods in Java interfaces. (more…)

Calling constructors from other constructors in Java

February 16, 2016 Java 1 comment

Java calling one constructor from another

Very often we write multiple constructors to make a possibility to create objects with different initial state. Those constructors very often in large part do the same thing. Instead of rewriting the same code in every constructor, we can call one constructor from another. In this article I explain how to do this. (more…)

Is Java pass by value or reference?

February 14, 2016 Java 19 comments

Does Java pass by value or by reference?

In this article I will answer the long asked question by beginners, “is Java pass by value or reference?“. (more…)

Reading user input in Java

February 14, 2016 Java 4 comments

java reading user input

In this article I will shorty explain a few techniques how to read user input in Java. (more…)

Calculating range of Java integer types

February 14, 2016 Java 3 comments

 

Java types range

Learn with this article how to calculate range of Java integer types. You will never have to Google for the Jave type range table anymore! (more…)

Converting between String and numeric types in Java

February 13, 2016 Java 1 comment

String to int Java

In this article I will shorty explain how to perform conversions between String and numeric types in Java, like String to integer. (more…)

org.apache.http.HttpException: Unsupported Content-Coding: none solution

February 9, 2016 Java 4 comments

Apache Commons HTTP Components HTTPClient

Did your code using Apache Commons HTTPClient just throwed the org.apache.http.HttpException: Unsupported Content-Coding: none exception? No worries, I have a solution. (more…)