View RSS Feed

Core Java

Core Java tutorials.

  1. Using Imports to Change Behaviour

    by , 11-29-2011 at 04:24 AM
    One thing that would be great to have is a feature that I know well from my previous experience coding in C. That is the possibility to conditional compile in order to modify the behaviour of the application. A feature that is missing from Java is C’s conditional compilation, which allows you to change a switch and get different behaviour without changing any other code. I think is was left out of Java is that I remember using this feature often to address issues related to compiling a program ...
  2. Managing Initialization and Class Loading

    by , 11-29-2011 at 04:20 AM
    Java avoids many of the problems found with other languages related to the startup and initialization of objects in the right order, by taking a different approach to loading. The key to this is that everything in Java is an object. Each class exists in its own separate file. Therefore files are not loaded until the code is needed. The expression of this is that “class code is loaded at the point of first use.” This is usually when the first object of that class is constructed, but loading also ...