Daniel Liu

Greenhorn
+ Follow
since Jul 05, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Daniel Liu

I am new to j2ee.
I have installed j2sdkee1.3 into my NT4.0.
And set varibles:
J2EE_HOME=c:\j2sdkee1.3
JAVA_HOME=c:\jdk1.3
CLASSPATH=.;c:\jdk1.3\lib;c:\j2sdkee1.3\lib;
PATH=c:\jdk1.3\bin;c:\j2sdkee1.3\bin;
I can compile sample appilications. But I have some problem when I develop sample applictions. For example, For sample application "Converter", follows steps showed in Chapter 2 of J2EE Developer's Guide, I got this point
1). Creating the J2EE Application.
no prblem.
2). Packaging tje Enterprise Bean
no errors.
3). Depolying the J2EE Application
steps a-g OK!!!
step h. After I clicked Finish buttom, the following error message appeard:
There was a deployment error
java.rmi.ServerException:RemoteException occurred in server thread;nested exception is:
java.rmi.RemoteExveption:Error saving/opening
Any help would be appreciated greatly.



Sorry, there was a typo in my original post so I it repost below.
You have an application which execute the following line:
Thread myT = new Tread();
myT.start();

Select all of the crrect statements.
a. The Tread myT is now in a runnable state.
b. The Tread myT has the NORM_PRIORITY priority.
c. The Tread myT will die without accomplishing anthing.
d. The run method in the class where the statement occurs will be executed.
The answers are a and c. But why not b and d? [/B]
http://www.geocities.com/SiliconValley/Screen/5046/testpass.htm

Originally posted by Surya K:
Could you pls. tell me the sullyvan Mock exam address.


Question: [Check all the correct answers]
You have an application which execute the following line:
Thread myT = new Tread();
myT.start();

Select all of the crrect statements.
a. The Tread myT is now in a runnable state.
b. The Tread myT has the NORM_PRIORITY priority.
c. The Tread myT will die without accomplishing anthing.
d. The run method in the class where the statement occurs will be executed.
The answers are a and b. But why not b and d?
Question: [Check all the correct answers]
Given the following calss definition:
1. public class DervedDemo extend Demo {
2. int M, N, L;
3. public DerivedDemo (int x, int y) {
4. M = x; N = y;
5. }
6. public DerivedDemo ( int x) {
7. super(x);
8. }
9. }
Which of the follwing constructor signatures MUST exist
in the Demo class for DerivedDemo to complie correctly?
a public Demo(int a, int b)
b public Demo(int a)
c public Demo()
The answer are b and c.
Could you explain why c is necessary ?
You got very good score and the answers you want is at: http://www.jchq.net/mockexams/exam3.htm

Originally posted by Nirmala:
Hi all,
http://www.software.u-net.com/applets/Exam/Exam.htm
After finshined this exam ,message displayed you got 85% and see html version to see the wrong answers. But I could not find the Html version. Can anybody send help me.
Thanks.
Nirmala


Originally posted by sdev:

I tried to use yield() in the main method, when I called yield() from the currently running thread that is main() then the o/p is
in.run()
after t.start()
May be you can make out the answer why it was reverse before.
Thank you, sdev and Ankur.
Thread class has static final int member
MIN_PRIORITY =1;
NORM_PRIORITY = 5;
MAX_PRIORITY =10;
The default priority is NORM (I guess) if you
do not set priority property for a thread.
Question: I have a doubt, how can you say the thread priority is 5.
class Test3 implements Runnable {
public static void main(String args[]) {
Test3 rt = new Test3();
Thread t = new Thread(rt);

t.start();
Thread.yield();

System.out.println("after t.start()");
}
public void run() {

System.out.println("in run()");
}

}
thanks
sdev


What is the output of the following program?
class Test {
public static void main(String args[]) {
String empty = new String();
System.out.println(empty == empty.toUpperCase());
}
}
The output is: true.
Could you explain why?

Originally posted by Daniel Liu:
What is the output when compile and excute the following code?
class Test implements Runnable {
public static void main(String args[]) {
Test rt = new Test();
Thread t = new Thread(rt);
t.start();
System.out.println("after t.star()");
}
public void run() {
System.out.println("in run()");
}
}
The output on my machine (NT) was:
after t.star()
in run()
Why???


Sorry, it was not clear in my original post. My question should be read why "after ... " was printed before "in run()" ?
What is the output when compile and excute the following code?
class Test implements Runnable {
public static void main(String args[]) {
Test rt = new Test();
Thread t = new Thread(rt);
t.start();
System.out.println("after t.star()");
}
public void run() {
System.out.println("in run()");
}
}
The output on my machine (NT) was:
after t.star()
in run()
Why???
I have just tried pgjc mock exam and got only about 50% correct.
I feel it is very difficult. Any one there has a similar experience? Please share idea how you improve skills on the test.
BTW, Where can I find the answers of the exam.(I mean, pgjc-engine mock exam).
It is said There are two versions of Programmer Certification exam: JDK 1.1 and Java 2. Please tell me the forum is aim at which one, JDK 1.1 or Java 2?
Hi Ajay,
I can not find MindQ exam where you pointed to.
Daniel

Originally posted by Ajay Kumar:
Hi everybody,
I have uploaded the MindQ exam into the xdrive at www.xdrive.com and LOGIN as javacert and PASSWORD as javacert. In the public folder U will find the MindQ.htm. Download the file to your drive and use it. There may be some problems with the original file so the answers are at
http://www.javaranch.com/ubb/Forum24/HTML/001146.html .
Good Luck
Ajay K.
PS. The site also has numerous other files useful for java certification. I hope Ramamurthy does not mind.


QUESTION : 7
Imagine that there are two exception classes called Exception1 and Exception2 that descend from the Exception class. Given these two class definitions,
1. class First {
2. void test() throws Exception1, Exception2 { . . . }
3. }
4. class Second extends First {
5. void test() { . . . }
Create a class called Third that extends Second and defines a test() method. What exceptions can Third's test method throw? Select all valid answers.

a. Exception1
b. Exception2
c. No checked exception
d. any exceptions declared in the throws clause of the Third's test() method

The question is from JQuest and The answer is: c.

Why? Please explain in detail.
Thanks. That is what i do't know.

Originally posted by Ankur:
It means that >> operator will put the same sign in the most significant bits i.e. for +ve nos. it will put zeros and for -ve nos it will put 1 in the most significant bits.