Monthly Archives: February 2008

[XKCD] Exploits of a Mom

Posted in Jokes | Tagged , | Leave a comment

Envidiando a Groovy

Si hay un operador que extraño en Java despues de estar un rato con Groovy es “?:“. El operador “Safe Navigator”. La idea de este operador es muy simple pero poderosa a la vez como se vera a continuación. Es muy común abusar de la flexibilidad de Java y la magia de la POO para [...]
Posted in Groovy | Tagged | Leave a comment

Generics 201

Los Generics son un invento maravilloso hasta que nos encontramos con que no tienen un comportamiento demasiado polimorfico respecto a los objetos que queremos agregar a las colecciones. Suponiendo que partimos de esta jerarquia. class Animal { } class Perro extends Animal { } class Gato extends Animal { } Las declaraciones List<Animal> animales1 = new Arraylist<Perro>(); List<Animal> animales2 = new [...]
Posted in Uncategorized | Tagged | 1 Comment

La Batalla de SCJP

The %b (boolean) conversion character returns true for any non-null or non-boolean argument. Que una conversion de cualquier valor no-booleano y no-null sea true es la cosa más estupida que escuche en mi vida. Period.
Posted in Uncategorized | Tagged | Leave a comment

Serialización 101

class Animal {  public String name; } class Dog extends Animal implements Serializable {   // the rest of the Dog code } Because Animal is NOT serializable, any state maintained in the Animal class, even though the state variable is inherited by the Dog, isn’t going to be restored with the Dog when it’s deserialized! The reason is, the (unserialized) [...]
Posted in Uncategorized | 1 Comment

Errores y Excepciones

You are not required to catch Error objects or Error subtypes. You can also throw an Error yourself (although other than AssertionError you probably won’t ever want to), and you can catch one, but again, you probably won’t. What, for example, would you actually do if you got an outOfMemoryError? It’s not like [...]
Posted in Java | Tagged | Leave a comment
35665 pages viewed, 42 today
17305 visits, 10 today
FireStats icon Powered by FireStats