All posts in 'Java'

Hibernate and Inheritance Mapping

27-May-08

Hibernate supports multiple types of inheritance mapping, some of them (Table per class, Table per subclass) using a discriminator column to decide the class. The type of the discriminator can be one of string, character, integer, byte, short, boolean, yes_no, true_false In case you need to use any other than string or character, i.e. integer, […]

Read the complete article »

Division by zero

26-May-08

Just a quick reminder for myself: int a = 0/0; // Throws ArithmeticException double d1 = 0/0.0; // d1 is NaN double d2 = 1/0.0; // d2 is Infinity double d3 = -1/0.0; // d3 is -Infinityint a = 0/0; // Throws ArithmeticException double d1 = 0/0.0; // d1 is NaN double d2 = 1/0.0; […]

Read the complete article »

SCJP, finally!

06-May-08

More than a year ago i decided to do the Sun Certified Java Programmer. Shortly after i bought this book, the projects at work and at home were somewhat overwhelming and after all, i realized that a big part of the SCJP is about some weird, crazy and sometimes wrong design decisions of the Java […]

Read the complete article »

Tired of all the powerpoint presentations…

23-Apr-08

Right now i’m in Wiesbaden, attending the JAX 2008 conference. The mood is somewhat different compared to the DOAG i used to visit the last years. The people are more open minded, partially much younger and generally try to be much cooler. And for the sake of it, some are even more interesting and after […]

Read the complete article »

Beyond all evil: Javas definition of an object

09-Apr-08

Some days i ago, i decided to revamp my ambitions to get the scjp thingy done. What exactly for, i don’t know. But working to the self tests, i found the following: class Ring { final static int x2 = 7; final static Integer x4 = 8; public static void main(String[] args) { Integer x1 […]

Read the complete article »