Wil Guo

+ Follow
since Jan 09, 2006
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Wil Guo

Hi, I just started maintaining an application which includes 1 web project, and 20+ EJB2.0 projects using WSAD5.1. When I tried to config the servers, under Applications tab, no application shows up in the Application settings filed. Where should I look to fix this? I appreciate any hint!
This is the question from K&B book

Output would be: 10 0 10

Can anyone explain why s2.z would give 10? What is the result when trying to serialize and deserialize static variable?


[HENRY: Formatted Code]
[ December 11, 2006: Message edited by: Henry Wong ]
These two threads have the same default priority. So before thread 1 completes (output "Wallace-2"), thread 2 could start and then thread 1 finish, thread 2 finish. It is also possible that thread 2 completes before thread 1.

Originally posted by Jothi Shankar Kumar Sankararaj:
Hi Above,

It dosn't compile simply because, the reference type is of class A and when you say A a = new Main() and do a.bMethod(), it checks for the method in class A which is not there, so it results in a compile time error.

According to the polymorphism link posted, java uses later-binding and should call method in child class, in this case, should call method in Main.
This is a little confusing, in the above example of class A and Main, if class Main has its own method as

class A{
public void aMethod(){
System.out.println("From superclass");
public void aMethod(String s){

public class Main extends A {
public void aMethod(){
System.out.println("From subclass");

public void bMethod(){
System.out.println("From subclass, non-inherit method");

public class Test {
public static void main(String[] args){
A a =new A();
Main m=new Main();
a = m;
a.bMethod();//this line doesn't compile, why?
I am trying to understand how to create EJB jar file for weblogic. The problem I have is that the created jar file doesn't have the ejb classes. Can anyone tell me if this is correct?

<ejbjar srcdir="${extractsessionEJB.classes}" descriptordir="${ejb.source}\extractsession\META-INF" basejarname="CEEDSEAR_EJB_extractsession.jar" genericjarsuffix="">
<weblogic destdir="${ejbc_output_location}">
<pathelement path="${build.classpath}"/>
<include name="**/*-ejb-jar.xml"/>

I am confused about this terms. Can anyone clarify them for me?

local class, nested class, inner class, member class and anonymous class

Will they appear on the exam?

your program will stop at System.exit(0)
Can anyone explain that the result of -1>>>32 is -1 not 0?
Hi, Edwin
I am studying the Threads topic as well. Could you send me those books as well? Thanks!
Hi, In the chapter about inner class in K/B book, it says a Method local inner object can't use the local variables of the method the inner class is in. But if you mark the local variable final, it will work. Could anyone explain a little bit? Thanks!