# Khalid mock exam

Anonymous
Ranch Hand
Posts: 18944
Can anyone please tell me where do i find answers for Khalid mock exam?
Regards
VR

Jim Yingst
Wanderer
Sheriff
Posts: 18671
There aren't any. If you aren't sure of a particular question, you can leave all the other questions unanswered and answer only that one question. If you get 0% the answer is wrong; if you get 1-2% the answer is right. Of course, this takes some patience...

maha anna
Ranch Hand
Posts: 1467
Jim, Have you tried that... It really tests our patience especially when we are half way through, we get the same qstn again and again and as the no of qstns we tested already increases, the probablity of getting a new , fresh one also decreses.
regds
maha anna

kusuma janardhana
Greenhorn
Posts: 7
can anyone give me the link to kahild's mock exam..?

Chitra Natarajan
Greenhorn
Posts: 13
here is the link to Kahild's Mock exam
http://www.ii.uib.no/~khalid/pgjc/jcbook/engine.html
Originally posted by kusuma janardhana:
can anyone give me the link to kahild's mock exam..?

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Maha- you're right, that is pretty boring. It's actually much more fun to hack the code to force it to give you the answers. Here they are:
1)4
2)2
3)2
4)2, 6
5)4
6)3
7)4
8)4
9)1, 2, 3, 5
10)1, 4, 5
11)4
12)5
13)1
14)"LayoutManager layout = new GridLayout(2, 3);"
or: "LayoutManager layout = new GridLayout(2, 3)"
15)5
16)3
17)2, 4
18)4, 5
19)2
20)4
21)4
22)5
23)1, 2
24)2
25)1, 4
26)3
27)4
28)3
29)1, 4, 5
30)5
31)2, 5
32)1
33)3, 4
34)2, 3
35)2, 4
36)3, 5
37)2, 5
38)3, 4
39)1
40)1, 2, 3
41)"wait"
42)3
43)3
44)5
45)4
46)1, 2, 3, 4
47)2
48)1, 2, 4
49)1
50)2
51)1, 5
52)1, 3
53)1
54)2, 5
55)5
56)2, 3
57)4
58)2, 3
59)5

[This message has been edited by Jim Yingst (edited August 06, 2000).]

maha anna
Ranch Hand
Posts: 1467
You get an 'A' for your patience Jim. . (If not you hack the code and gave us this list.. ). I did hack Jxam source to force to get all 200 qstns. Now maha's secrects are coming out.
regds
maha anna

Anonymous
Ranch Hand
Posts: 18944
coool!!!
but how do u hack!!!
i know the probability of getting an answer is very low!!!
still wanted to know...
Keep up the good work!!!

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Hmmm... I'm surprised no one has asked about the obvious problem with the above list of answers. At least, it will be obvious once anyone tries to use it.
As for the hack, the largest amount of work was done by JAD, a Java decompiler. This takes class files (or jar files) and generates remarkably readable Java source from them. Extremely useful - the main alternative would be to use javap to translate the bytecodes, which is a lot harder to read (though also very educational). From there, you study the source until you understand how it works, and then edit it to print out the answers for you. The hardest part of this comes from the fact that the answers (and questions) are stored in a file using object serialization. The thing is, the format of the serialization is very sensitive, and if you edit a class definition, it changes the format of the serialization such that you lose the ability to deserialize a file which was created using the old class definition. This is not obvious - you just start getting random errors from methods which try to operate on the deserialized data, which go away only if you restore the class definition to what it was originally. So, you have to edit only those classes which are not part of the serialization.
Hmmm... I guess now I'll have to go hack Jxam to see what that's like.

Junaid Bhatra
Ranch Hand
Posts: 213
Hmm pretty cool Jim...The only problem with the list of answers you provided is that the questions are all randomly selected whenever you start the exam engine. So it's useless unless you provide the questions too.
Actually I had de-compiled Jamie Jaworski's certification applet some time back to get all the questions (170 I think). I used Source again (www.ahpah.com) which came along with the Core Java 2 CD.
[This message has been edited by Junaid Bhatra (edited August 01, 2000).]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Yup, the lack of questions was indeed what I was referring to. I have a list of those too, but haven't decided what to do with them. It might be a copyright violation to post the whole list publicly. I think I'll write Mughal & Rasmussen myself to see how they feel about it - if it's OK with them, I'll put the list up somewhere publicly.
Note to all - do not e-mail me asking me to send you a copy; I will try to find a way to make this info available, but I don't want my mailbox flooded in the meantime. Thanks for understanding.

[This message has been edited by Jim Yingst (edited August 01, 2000).]

Junaid Bhatra
Ranch Hand
Posts: 213
Along the same lines, I was wondering if there is a way to prevent people from de-compiling or hacking your class files? It's a scary prospect knowing that anyone out there can de-compile your applet/application and see your source code. I know you can use some obfuscation tools but how effective is that? Is there a way you can encrypt your class files or something like that?

Jim Yingst
Wanderer
Sheriff
Posts: 18671
I've only dabbled with decompilers and obfuscators. My impression is that obfuscators can certainly make it more challenging to reverse-engineer code, but probably not impossible. It might be worth starting a discussion over on Utilities to see what other people think.