Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Kenneth Ho

Greenhorn
+ Follow
since Mar 22, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kenneth Ho

You may use the library "StringTokenizer". I can't remember the code, you can search in API document.
18 years ago
I also asked sun mirco
This is their reply to me


The article you're referring to is a bit outdated. To write Java for Palm,
you're advised to download the MIDP for PalmOS now. The early access version
is available from:
http://java.sun.com/products/midp/palmOS.html
The CLDC 1.0.2 release doesn't provide the overlay package anymore. You can
also find this information from the ReleaseNotes.pdf file included in your
downloaded file.


But MIDP is categorized "early access" and the size of file midp.prc 536k (quite large). I really wonder how can it used to develop application on palm.
I'm new to palm and J2ME. Now, I think GCC for Palm would be a better choice at this moment.
18 years ago
I also asked sun mirco
This is their reply to me


The article you're referring to is a bit outdated. To write Java for Palm,
you're advised to download the MIDP for PalmOS now. The early access version
is available from:
http://java.sun.com/products/midp/palmOS.html
The CLDC 1.0.2 release doesn't provide the overlay package anymore. You can
also find this information from the ReleaseNotes.pdf file included in your
downloaded file.


But MIDP is categorized "early access" and the size of file midp.prc 536k (quite large). I really wonder how can it used to develop application on palm.
I'm new to palm and J2ME. Now, I think GCC for Palm would be a better choice at this moment.
18 years ago
I tried to download the KVM and J2ME SDK, but I can find the following file:
j2me_cldc-1_0_2-fcs-src-b12-winunix-15_Jun_2001.zip

I can't find any KVM.prc or *.prc files in this ZIP file.

According to the article "Setting up the KVM on your Palm
and Getting Started with the KVM", I should download the

j2me_cldc_1_0_src-winsol.zip
j2me_cldc-1_0-src-palm_overlay.zip

But I can't find anyone of it. It looks like I "was cheated by the download area".

Please help me to find those files!

Regards,

Kenneth Ho
18 years ago
I created a database to store articles. The content contains Chinese Big5 code. I can stored it in MySQL, but I have problem displaying the content. The Chinese coding become something like "???Ld". I am not sure this is the Chinese handling problem of MySQL, Linux server or programming. How can I solve it???
This is the page to insert data: http://www.webappcabaret.com/pkin/WEB-INF/insertform.jsp
This is the page to show data (id=articles number): http://www.webappcabaret.com/pkin/WEB-INF/show.jsp?id=2
show.jsp
18 years ago
About Q of thread, I remember I have 7-8 Qs about it and only 1-2 are theortetical. u'd better know how to make code of deadlock.
GC question is certainly not the same, but the Q I saw is very very similar to the coding Q u can see everywhere. If you know how to answer the question, u will have no problem in the exam. (If u have the same Q as me).
Velmurugan's note is a great material for the exam, it really help u to memorize all the necessary points (collected from different books) in the exam.
18 years ago
81%!!! & my exp.
Hi ranchers, I score 81% in the cert exam yesterday. It's very good for a guy w/o IT background. This forum really helps me a lot. It's now my turn to give you as much hints as I can remember.
I score 100% in java.IO (4-5Qs) coz all Qs have been covered in JQ+ & Marcus. Most Qs ask the use of constructors . It's worth while to put effort for the easy-scoring questions.
Yes, many Qs about Thread, but they've all been covered in JQ+. The concepts of "sychronized" & deadlock are important. One asks u which method can move a thread from one stage to another. You've to remind that a Q put an Runnable "that" into a Thread as an argument which want to make u confused with the "this".
GC question is the coding question that u can see many times in this forum.
I remembered there are at least 2 Qs putting 1 or 2 variables into a method with no return type and test u whether the value have been changed. They ar similiar to Qs in Marcus.
Method declaration & access modifier is surprisingly my worst part 67%. This part has some theoretical Qs about inner class (esp. anonymous class). Whether a method in the subclass can override the method in the parent class with different return type but the same signature and same method name (no argument for ex.) is one thing that I��m not very sure in the exam.
Finally, the disclaimer really surprised me. They are two questions asking you to agree or disagree sth which contain long passages. The most important thing is the timer has started counting. I've no time to wise and just click "agree" in both Qs. Does anyone know what the disclaimer say?
My score in Marcus 73%, 75%, 60% for exam 1, 2 & 3. It��s a must for the exam. JQ+ is another useful learning tool for me. I score from 43%-55% for the first 4 exams, 68%-75% for the last 4 after hardworking on studing the Qs.

I use RHE bible, the Complete Java 2 Certification Study Guide and Sun��s materials.
I studied the Sun��s training course (it��s name seems to be ��Java Language Programming��) and then study Complete Java 2 Certification Study Guide. RHE is the reading for the exam. I used to study 3 - 4 hrs after working since late Feb, but 6-8 hrs/day 1 month before the exam.
I��m now teaching computer as part-time and am trying to search for a job in Web industry. I��ll know if this cert. can help me to find a job in Hong Kong soon. I want to develop a project with JSP and Servlet too.
18 years ago
As the shift rule of x%32 where x is the number of bits shift, an 32-bit integer remains no change if u shift it 32 or 64 bits. For a 64-bit long type, shifting 64 or 128 bits has no effect.
// The shift operator cant change the value of number 1
(int) 1 >> 32;
(int) 1 >> 64;
(long) 1 >> 64;
(long) 1 >> 128;
I'm very clear now. Thx all of u.
Mind Q #36
How many objects are eligible for garbage collection once execution has reached the line labeled Line A?
String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";
String newestName = name;
name = null;
//Line A

My answer is 0. The right answer is 1. Is the object "Nick" is eligible for garbage collection?
This is my explaination. The equals() method of StringBuffer in sona's example is inherited from the class Object which is to compare the references of 2 objects.
class A{
public static void main(){
A a = new a();
StringBuffer strB = new B();

a.equals(b);// Using the equals() of Object class
strB.equals(a);// same as above
}
}
Only the equals() method of class String can be used to compare the contents of 2 string objects.
Correct me if i'm wrong.

Kenneth Ho
Thanks a lot. ur explanation is very clear.
There are 2 classes A and B.

The result of running B is as follow:
B's money
0
B's money
200
My interruption is that when the programme establishes instance of A and call the A constructor, there is no instance of B. Hence, the complier returns 0. The second B returns 200 becasue the instance of B has been establish.
I don't know whether my interruption is right. I would like to know how the complier handle the code.
I'm sorry to hear that. I'm also studying for SCJP.
Have you seen Velmurugan's note. I find there are lots of important things in the doc that you have to notice in the exam.
http://www.geocities.com/velmurugan_p/
Kenneth Ho
18 years ago
In the section "Assignment Conversion, Little Primitives, and Literal Values" (Charpter 4 of RHE) state that:


byte b = 1;
short s = 2;
char c = 3;
In fact, all three of the lines above compile without error. The reason is that Java relaxes its assignment conversion rule when a literal int value is assigned to a narrower primitive type (byte, short and char) provided the literal value falls within the legal range of the primitive type.


Hope this can help.