Help coderanch get a
new server
by contributing to the fundraiser

jaman tai

Ranch Hand
+ Follow
since Sep 26, 2005
Merit badge: grant badges
For More
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 jaman tai

I have a form having 3 buttons. One is �Approve�, one is �Reject� and one is �Back�. If click Approve, update db directly and back. If click �Reject�, pup up a small window to ask the reject reason. (I am using javascript�s windows.open) after input the reason and click �go�, close the small window, update db and the original page goes back. If click �Back�, go back directly. How can I design this page? I know a little about LookupDispatchAction. Can anybody help me? Thanks a lot!
18 years ago
I have a form having 3 buttons. One is �Approve�, one is �Reject� and one is �Back�. If click Approve, update db directly and back. If click �Reject�, pup up a small window to ask the reject reason. (I am using javascript�s windows.open) after input the reason and click �go�, close the small window, update db and the original page goes back. If click �Back�, go back directly. How can I design this page? I know a little about LookupDispatchAction. Can anybody help me? Thanks a lot!
18 years ago
i just passed the scjp exam. i am wondering which one should i take for the next exam. who can help me to compare 2 of them? thanx a lot!
i think Barry is correct! because yeild is static method of Thread, current thread should pause and that is main.
public class Test1{
public static void main(String args[]){
MyT myt = new MyT();
myt.start();
myt.yield(); //1. who will temporarily pause and allow other threads to execute
}
}

class MyT extends Thread{
public void run(){
System.out.println("MyT.run()");
}
}


after //1, who will temporarily pause and allow other threads to execute? t or main?
oh, thanks Srinivasa!
byte b = 0;
b += 1; //1 no error
b = b + 1; //2 error

why //1 has no error?
interface A{
class B{} //this is static!
}

because B is static, i think it is top-level inner class. if i am wrong, please correct me.
With respect to User and Daemon threads:

a) Daemon threads can not be destroyed

b) Running User threads prevent a JVM from terminating program

c) Running Daemon threads prevent a Java VM from terminating program

d) Daemon threads can not be grouped together

e) The JVM can terminate program when only daemon threads are running

answer: b, e? why e is correct?
Which of the following statements is true?

a) An interface can contain a nested top-level inner class.

b) An interface can contain a member inner class.

c) A member inner class can implement an interface.

d) A static method can contain a local class.

e) A static method can contain a nested top-level class.

are the answers c and d? why a is not correct?
[ October 18, 2005: Message edited by: Barry Gaunt ]
r u sure to have compiled the source? i compiled it and got no error in line 1.
oh, that is exactly what i need! thanx!
oh, you are right! , thanx!
oh, good reply. thanx a lot!
class Test2 extends Object {
public static void main(String args[ ]) {
Test2.t();
}

static void t(){
static class AA{}//Compilation Error
private class BB{}//Compilation Error
public class CC{}//Compilation Error
final class DD{}
abstract class EE{}
class FF{}//1. no error. but is it abstract or final?
}
}

I don't know what is the meaning of line //1. who can explain?