Praveen Durbha

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

Recent posts by Praveen Durbha

Yeah, you are right. I should have known. It works fine now.

Thanks.
Praveen.
Hi,
I am having trouble running the first exercise(Exercise 1.1) in David Bridgewater's book for SCWCD. In Step 3, running this command:

java uk.co.jbridge.httpclient.UserInterface

from the command prompt should open the UI. But it doesn't. For some reason, it's not able to locate the UserInterface.class file.

My CLASSPATH settings are: C:\jakarta-tomcat-5.0.28\bin;C:\j2sdk1.4.2_10\bin

UserInterface.class is located at :
C:\jakarta-tomcat-5.0.28\webapps\ex0101\WEB-INF\classes\uk\co\jbridge\httpclient

Appreciate your help.

Thanks.
Praveen
Thanks for the positive review Sandhya. I bought it from Amazon. I hope to take the exam in a few weeks from now.
How do you like the Bridgewater book Sandhya? Is it worth the buy..I am planning to buy the book but there was just one review on Amazon so I am still debating.

Thanks.

Praveen
Mock exams don't necessarily reflect your score in the actual exam. Believe in yourself,that helps. It did for me. I scored 83%.
I would recommend this book for beginners - Struts Complete Reference By James Holmes and Herbert Schildt. It's a good book but the example in the first chapter has a couple of errors. You will have to download the source code from the author's website.
19 years ago
Marc & co,

I have another question regarding equals(). We know that every class extends from the main class Object and every class overrides the Object class equals() method. But how do we know/remember the implementation details of the equals method in every class in the API.

For example, consider the Vector class. This class has overridden the equals method. Now, let's say I have a Vector object and a Linked List object and they have the same contents. So if I do a v.equals(l) it will return true. But if I compare the Vector object with a TreeSet object having the same contents they are not equal i.e. v.equals(t) will return false. The API says that equals() method of Vector will return true only when compared with a list object which explains this anamoly.

So, my question is for the exam, do I need to understand the implementation details of equals() method in every class in the API. If not, what are the important classes. To name a few,I know String and Wrapper classes are important.

Thanks.
Understood. So what you are saying is the copy reference can modify the attributes of the original object but as long as the copy reference is not returned to the calling method, the object is still eligible for garbage collection.

[ May 23, 2005: Message edited by: Praveen Durbha ]
[ May 23, 2005: Message edited by: Praveen Durbha ]
Thanks for your feedback. This is what I understood from your comments.

It doesn't matter if the orignial reference is set to null..since a copy of the point reference exists and since we are not sure what the copy reference is doing the Point object cannot be garbage collected. So in the Rectangle constructor if the code looks something like this ..then the object is eligible for garbage collection

Rectangle(Point pt,int x,int y){
pt = null; // The copy reference is set to null

}

Rectangle(Point pt,int x,int y){
pt = new Point(); //The copy reference goes off and creates a new
//instance and it has no way of reaching the
//original instance

}

The execution of this code combined with the statement point = null will make the object eligible for garbage collection. Correct?

Thanks.
[ May 23, 2005: Message edited by: Praveen Durbha ]
The upgrade is already out and is available on the Sun website.
Point point = new Point(2,4);
Rectangle rectangle = new Rectangle(point, 20, 20);
point = null;

How many objects are eligible for collection after the code runs. My answer is the Point object is eligible for garbage collection..but the java tutorial says none..Not sure why.Any thoughts?

Thanks.
You are probably right Joyce..didn't realize i was running a 1.3.. need to test it on 1.4 though.
Joyce,

I am not sure why you said it wasn't possible. Here..Check this out.

//class in default package and in file First.java
public class First {
public void first(){
System.out.println("first");
}
}

package cert;
import First; //Possible
//class in package cert and in file Second.java
public class Second {

public static void main(String[] args){

First f = new First();
f.first();
}

}

output: first

Notice you don't have to extend from First since the class is public..meaning it can be accessed outside the package
(default or otherwise)
[ May 20, 2005: Message edited by: Praveen Durbha ]
The book should be available in B&N on May 31st. You can actually pre order it. If what Nick says is true, then maybe Kathy needs to be contacted.

http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=ygx1rzYoUa&isbn=0072253606&itm=2
I believe it's going to be out on May 31st.