Java – Control Statements

Again, a post that I use as a reminder. This time with the Java Control Statements. Java’s Selection Statements if



The expression must be of type byte, short, int, or char. Each case value must be a unique literal (that is, it must be a […]

Java Language Keywords

This is a summary of Java Keywords, operators, etc.  A quick view for those occasions when I forget which ones are available in Java. Java Language Keywords The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them […]

The Three OOP Principles

All object-oriented programming languages must provide mechanisms to implement the object-oriented model. These mechanisms are encapsulation, inheritance, and polymorphism. Encapsulation According the author Herbert Schildt (Book: Java, the complete reference): Encapsulation is the mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference […]

Java, Apache Commons Logging and Log4j2

Introduction When systems get larger and larger, we need a powerful way to collect useful information for debugging. We can not say: Let’s use

Because then, YOUR problems will start to be larger. For instance, supposing you’ve finished your program: are you going to delete every line with System.err.println? Or just […]

Java Naming Conventions

Is it a rule? No. A naming convention is NOT a rule. They are just suggestions to name your identifiers (e.g. class, package, variable, method, etc..). Why do I need them? Because it’s useful not only for you (because you will have a self-documented code) but for other programmers who […]

How to install Java JDK in CentOS 1

As probably you know there are different JDKs to install. I recommend the Oracle one. 1. Download the JDK which you are interested in. For instance: You may want to install the JDK7. So, you should go to Java SE 7u67 section and click on [JDK Download] button on the […]

Getting Started with Java

As Oracle define it: Java technology is both a programming language and a platform. 1. The Java Programming Language The Java programming language is a high-level language. Characteristics: Strongly-typed (pre-define variables and conversion) Object oriented (except primitives data types) Distributed Multithreaded Dynamic Architecture neutral Portable (Platform independent) High performance Robust […]