March 26, 2010

Exam...@_@

wahahahaha....tomoro is the day!!!!! esok i mean hari nie, lebih kurang 9 jam lg ada post-assessment & MOCK exam utk SCJP (Sun Certified Java Programmer).....TT_TT....Ya Allah, soalan bkn main susah lg....output tracing....yg penting it`s MANUALLY done okes!!!!!hahaha.....smpt lg ak blogging....sbbnyer ak nk mnth tgk soklan yg byk + x paham + sgt2 complicated.....(alasan org yg mmg x suka programming).....MEMANG pon....dari 1st yr ak cuba utk suka programming....hahaha...1-1nyer subjek yg ak suka masa 2nd yr, data structure...tu je yg ak btol2 paham.....bila dah masuk algorithm.....WTF!!!! tapi bla ak mengenali php, wahhhhhhhhhhhhhhhhhhhhhhh, baru la ak jatuh cinta balik dgn programming...tp ramai yg kata php senang...mmg senang pon...hehehe....tp ak xla terer sgt....masih beginner level, cuma atas sket je dari beginner...intermediate kot...lupa dah perkataan yg sesuai utk level atas pda beginner....kui3...

ak dah melalut ke php plak...aduyaii...sok mock exam, tpi xde hati pon nak buat....cam ak kata kat nadiah, "separuh javaku pergi".....huhuhu....tp esok ak akan cuba yg  terbaik wpun ak tau susah nk pass.....markah lulus tu 80%, 65 Qs, 3 hours.....@_@.....meh ak letak 1 coding yg kna trace manually...for those yg tau programming, korg mesti leh jawab...hehehe....Here`s the coding....

 class A {
    public void doA() {
        B b = new B();
        b.dobB();
        System.out.print("doA");
    }
}

class B {
    public void dobB() {
        C c = new C();
        c.doC();
        System.out.print("doB");
    }
}

class C {
    public void doC() {
        if (true)
            throw new NullPointerException();
        System.out.print("doC");
    }
}

public class TryMe {

    public static void main(String args[]) {
        try {
            A a = new A();
            a.doA();
        } catch (Exception ex) {
            System.out.print("error");
        }
    }
}


Answers :




 
 
 
Nie la contoh soklan utk mock exam...huhuhuhu.......tawakal je la sok......=.="

No comments: