Win a copy of Spark in Action this week in the Open Source Projects forum!

jordan gong

Ranch Hand
+ Follow
since Jun 12, 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 jordan gong

Hi, Seniors, I am a SCJP2, interested in Oracle technology, but confused about whether to take Oracle DBA or Developer or any other Oracle certification exams. Could you please give me some suggestion?
I don't have a lot experience with Oracle, but I think it is a good learning method to take those certification exams.
Thanks.
18 years ago
The code is like this
<HEAD>
<TITLE>Cal</TITLE>
</HEAD>
<BODY>
<H1>Cal</H1>
<APPLET CODE=Cal.class ARCHIVE=cc.jar WIDTH=450 HEIGHT=550>
</APPLET>
</BODY>
</HTML>
18 years ago
Sir/Madam:
My applet file is Cal.class, and it uses several other class files and a data file in the cc.jar file. When I open the html file, the applet pops up, I can see the textfields, radiobuttons, but the functions do not work. Is there anything wrong with my html code?

<HTML>
<HEAD>
<TITLE>Cal</TITLE>
</HEAD>
<BODY>
<H1>Cal</H1>
<APPLET CODE=Cal.class ARCHIVE=cc.jar WIDTH=450 HEIGHT=550>
</APPLET>
</BODY>
</HTML>
18 years ago
Dear Sir/Madam:
Is an applet initialized by init() also called an Java application? Is it also a stand-alone application that runs everywhere?
Does anybody know some easy way to transform the applet written by init() into main()? I understand that in main(), you should use frame container.
Thanks.
jordan
Yes Sir, it works now!
I need to set my classpath correctly.
Thank you so much!
jordan
Mr.Valentin:
No, it is not the case. After I compiled those files, I refresh the folder, but can only see the java files, no class file.
Maybe JVM default the class files to certain place?
thanks.
jordan
Thank you Dava and HIH!
HIH, you are right, after I tried javac -classpath :\com\cancal\New1.java, it works.
So the problem is the classpath, right?
But now the problem is, I could not find the class files in the same folder. Where does the New1.class file reside in this case?
thanks.
jordan
I have a funny inheritance problem here, which I could not understand why.
I put two java files in the "same folder", one extends the other.
The first one is:
public class New0 extends Object{}
I compiled it, no problem.
The second one is:
public class New1 extends New0{}
Now, I got error message when I try to compile this one.
The error message shows:
C:\com\cancal\New1.java:2: cannot resolve symbol
symbol : class New0
location: class New1
public class New1 extends New0
^
1 error
Tool completed with exit code 1
Why the second java file cannot recoganize the first class file?They are in the same folder and they are both public. I tried to put "package com.cancal;" in each file, but still does not work
Looking for help.
Thanks
Why don't you guys go to Europe or Asia? The salaries in Germany, Japan, HK, Singapore are not lower than North America.

18 years ago
Dear JavaRanch colleagues:
I just passed the exam this morning with 74%.
Thank you so much for your support. Thank you so much for this wonderful website. It is difficult to find such a nice group of people studying together. I put 3 months into this exam, averagely 5 hours a day. My undergraduate major is Business Administration. I am so happy that I can pass the exam. Sometimes, the study reminds me studying English in high school(I am a Chinese.)
I will hang around this website! Thanks again.
gong
19 years ago
Is the following statement about array right?
Only uninitialized class variables get default value automatically assigned to them. Local variables never get default values automically assigned. The exception is arrays, they always get default values assigned no matter where they are defined.
I declared an array in the main function, but the compiler gives an error saying that the array is not initialized.
thanks.
Sorry guys: I mis-typed the main() function.
The "&sim" came from one of RHE's sample exam. The answer explains the function of this is as same as "~". Maybe my machine can not show the " ~ ", so show the "&sim" instead.
But I doubt about it, we are talking about JAVA...
Mr.Sandeep: thanks for your answer. I am amazed by the code
like this. Do we program like this in reality?
Thanks.
Guoqiao:
Thanks a lot. You really helped me a lot! Pay attention to JQPlus, there are many answers wrong in the exam. For example, this one. The answer they give is for only one character.
Thanks.
Dear Helper:
1. For the following code application:
class Z{
public static void main(){
System.out.println("AAA" + new Z());
}
public static String toString(){
System.out.println("###");
return "Z";
}
}
The output is "###AAAZ".
I don't understand how the toString() is called here and how the program works. Can anybody tell me that?
2. What is "&sim". Is it as same as "~"?
3. Must the Imput/Output methods, like XInputStream, be used in try/catch block, otherwise causes compile error?
thanks.

Dear Helper:
I am totally confused. Some people state method in interface can be synchronized, some state cannot.
Which one is correct?
thanks.