Quick lessons on working with Java’s BigDecimal

Today I bring an example of the different results you can expect when using Java’s BigDecimal class. From instantiation to applying different arithmetic operations, it is important to understand how they affect the resulting instances. The following program shows different scenarios and results applied to BigDecimal’s. package test; import java.math.BigDecimal; import java.math.RoundingMode; public class Test …

Solution: Netbeans 8 not working on Ubuntu 15.10

Netbeans is one of my beloved day to day applications. Yesterday, when I installed Ubuntu 15.10 (Wily Werewolf) on my computer, Netbeans started to hang on the startup screen, specifically at the Loading Modules phase. It took me hours looking for solutions on the internet; and reinstalling different versions of the Java Development Framework didn’t …

The Rationale behind the Creation of a Model-View-Controller Framework: Fantastic

Important: This is a work in progress document. The Model-View-Controller is a software pattern frequently used for web development. As its name states, it is composed by three components: A Model or domain representation of a problem. It receives commands, processes them and modifies its state according to the input provided. A View whose main …

Create a connection to MySQL in Java

This time we are going to create a basic connection to MySQL in Java and pull some data from it. // Compile it: // javac Mysql.java // // Try it: // java -classpath mysql-connector-java-5.1.27-bin.jar:. MySQL import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; public class MySQL { public Connection getConnection() throws …

Installing Java 1.6 on CentOS 6

Nowadays more and more Java applications require at least a 1.6 JVM to run. However, the default CentOS 6 repositories still take you to the 1.5 version. By following this step by step tutorial you’ll be able to get version 1.6 running on your system.

Java, brigther than ever

Java, the programming language for many of us, is shinning more than ever! Just see how Android (Google’s operating system) uses it for its applications: http://en.wikipedia.org/wiki/Android_%28operating_system%29