Skip navigation.

BlogtimeException

By Behrang Saeedzadeh (the 5th incarnation)

Posts tagged with "Java"

MacBeans NBM Module Available for Download

, , , ...

An NBM module of the latest version of MacBeans is available for download. It is tested against NetBeans 6.1/Java 5 on OS X Leopard.


MacBeans Coda


The current bundle replaces editor and view tab control UIs with a pair of corresponding Coda-like UIs. A number of unfinished alternative looks such as Camino, Blue Camino, and Safari are also committed to the SVN repository, however at the moment it is not possible to choose a different MacBeans look.

Funny NetBeans Bug

, ,

I stumbled upon this today. It happened in NetBeans 6.1. I am not sure if I can reproduce it or not but here it is in action:



Basically a selection border remains visible no matter how hard you try to make it go away ;-)

Java Quiz #1

, ,

What will this program print in the console when you run it?

public class Main {
    public static void main(String[] args) {        
        A a = new A();
        B b = null;
        try {            
            b = new B(a);
        } catch (Exception e) {}
        
        System.out.println(a.b);
        System.out.println(b);
        System.out.println(a.b == b);
    }
}

class A {    
    
    B b;    
    
    void setB(B b) {
        this.b = b;
        System.out.println(this.b);
    }    
    
    public String toString() {
        return b.toString();
    }
}

class B {    
    public B(A a) {
        a.setB(this);
        throw new RuntimeException();
    }
    
    public String toString() {
        return "B";
    }    
}