Java articles

on waitingforcode.com

Documenting code with Javadoc

Writing a good code includes writing a code well documented. Usually, "well documented" helps programmer to avoid going to see 10 other people before understanding what the code really does. Continue Reading →

Prefer collections over arrays

Arrays and collections look similar. Both handle a group of similar type of objects. However, they have some differences, going from the simplest maintainability cases going to performance ones. Continue Reading →

Objects in Java 7

Java 7 was released in 2011 and brought to us, programmers, several interesting features as diamond operators or new I/O library. Yet another useful thing is less popular than two cited previously - Objects tool class. Continue Reading →

Static and instance methods in Java

Static methods in programming have some important roles. Mostly used as utility methods, they help to differentiate normal, business objects, from universal purely non contextual ones. They also gained a lot of recognition thanks to popular libraries, such as Google Guava. But there are another role useful in the case of static methods in Java ? Continue Reading →

Java and mysterious byte

As a developer who learned Java basically on web applications, understanding of byte existence in Java may be difficult. In this article we'll try to explain the reason of being of byte in Java environment. Continue Reading →

Anonymous inner classes in Java

Sometimes when you want to write a code "proof of concept", you can define classes without names, inside methods. It's for example the case of very common new Thread(new Runnable() {}).start() which launches new Java's thread. In this article we'll focus on these classes, called anonymous inner classes. Continue Reading →

Instruction try-with-resources

Java 7 was released on July 28, 2011. But they're still the places where we don't use all features of this version (because of installed 6 version or no budget to make the migration). One of these Java 7 elements which can improve code readability is, try-with-resources instruction. Continue Reading →

Types of exceptions

Using of standard Java exceptions simplifies the understanding of every project. But they are much exceptions that we can use and it's not always simple to found the right one. Continue Reading →