This article talks about the classes and quantifiers allowing to execute design pattern on a String.
Friday, 31 October 2014
Wednesday, 29 October 2014
Primitives
The ranges of primitive types
A primitive is stored as one or many bytes (1 byte = 8 bits). As all primitives are signed, the leftmost bit is used to represent the sign 0 for positive and 1 for negative. The rest of the bits represent the value.
Labels:
java core
Monday, 27 October 2014
Overriding and Overloading
You can not override a static method or an instance variable (their value is always defined from the reference type).
Labels:
java core
Sunday, 26 October 2014
Object Casting
There are 2 types of reference variable casting: upcasting and downcasting.
Labels:
java core
Wednesday, 22 October 2014
NumberFormat
The abstract class "NumberFormat" allows formatting a number using a "Locale" object.
Labels:
java core
Tuesday, 21 October 2014
Monday, 20 October 2014
Saturday, 18 October 2014
Inner and nested classes
There are 4 types of inner classes:
- an inner class (as an instance member of an outer class),
- a method-local inner class,
- an anonymous inner class,
- a static nested class.
Labels:
java core
Thursday, 16 October 2014
Tuesday, 14 October 2014
Sunday, 12 October 2014
Exception and Error
When a code throws an Exception, its intention is to notify the other codes depending on it that an unexpected error happened.
In the other hand, an Error is thrown by the Java system to notify about a non-recoverable error. Therefore, when an exception can be thrown and caught by your code, it is not a good practice to throw or catch an Error.
In the other hand, an Error is thrown by the Java system to notify about a non-recoverable error. Therefore, when an exception can be thrown and caught by your code, it is not a good practice to throw or catch an Error.
Labels:
java core
Thursday, 9 October 2014
HashMap structure
This small article talks about the implementation details of an HashMap.
Labels:
java core
Wednesday, 8 October 2014
The methods equals and hashCode
This article explains how the object equality and their hashcode work in Java and the rules to follow when overriding the methods 'equals()' and 'hashCode()'.
Labels:
java core
Tuesday, 7 October 2014
Monday, 6 October 2014
Compile and run a java program
This article details the commands to use to compile and run a java programs.
Labels:
java core
Constructor and initialisation blocks
This article talks about the rules to follow when implementing Java constructors and in which order the initialisation blocks and constructors are initialised at runtime.
Labels:
java core
Saturday, 4 October 2014
Friday, 3 October 2014
Thursday, 2 October 2014
Wednesday, 1 October 2014
Arrays in Java
An array is an object and consequently it is stored in the heap. It is possible to create one or many dimensional arrays. Let's see the various ways to write arrays in Java.
Labels:
java core
Subscribe to:
Posts (Atom)