Lee Clarke

Greenhorn
+ Follow
since Jan 18, 2001
Merit badge: grant badges
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 Lee Clarke

You can download a many free XML Parsers, I am currently working with Xerces which is Apaches XML parser. Its working fine and hasnt been hard to use. here's the site if you want to give it a shot. http://xml.apache.org/
good luck!

------------------
Lee Clarke - SCJP
Just wanted to say that I passed my exam! SCJP
All the boards, information and of course the roundup game really helped out.
Thanks guys
Lee Clarke SCJP
21 years ago
You can donload the trial from this address: http://www.ibm.com/webshpere the link should be right on the top page.
Unfortunantly I dont believe that you can get WebSphere to run on Win98 as the server has to run as an NT service. Also you don't have to use Visual Age, I have been doing WAS for over a year and never used Visual Age!
Have fun!
Lee
21 years ago
I have found Velmurugan's notes to be very useful, a few little mistakes arn't going to make or brake me after all if you've studied then you'll spot any major mistakes. I apreciate Velmurugan's efforts, I'mm a week from my test date and I'm glad to have some more consice notes!
JavaRanch is the best resource out there! Thanks for moderating it guys!
Lee
Well thats not quite true...
an Interface can be private or protected if it a Nested Class!
heres an example:

I got this code to compile just fine. I tried the same as a top level class and it is true that you cant make it protected or private.
Knowing how the exam questions are marked I think you would have to answer false to that question.
Lee
Deekasha,
There is an HTML equilivant to the jsp statement that I posted earlier, I can't remember the details of the statement. I believe it is posted in a meta tag.. something like this:
<meta contentType="application/vnd.ms-excel" >
I could be wrong on this part, I went to look it up and couldn't find it, I think its a meta tag or it goes in the <HEAD> tag. Pretty sure its a meta tag.
Lee
Humm OK I'll give it a try but Im not sure how well I'll do.
I think it goes like this (and someone please correct me if Im wrong!)
The reason has something to do with when methods are determined for the object which I believe is when the object it instanciated. (could be inaccurate here)
Esentually, even though you have casted the object to be a parent it is still a subclass in its methods because that's what it was created as. If you want to call the parents method you would call super.someMethod() as for the Grand Parents method, it is not accessable from 2 levels down, inotherwords you cant call super.super.someMethos().
I have a feeling Im not giving you the best answer, I hope someone else can expand on this..
Lee

Charlie,
I whipped up an example of this myself and it would certianly call the method belonging to this nomatter what you cast it to. The reason it does this is because you have overridden the method localy. If you had not overriden it then it would have called the parents or GParents method. It goes back to the rule that if B is a subclass of A then
A myA = new B();
myA.someMethod() calls someMethod() in B.
Now if you access a member variable it will return the Parents value.
Hope thats of some help!
Lee
Well on the frames issue, I say that in this day and age nearly all browsers have frames anabled but some will disagree. Your only choice to address this would be to build a second non-frames version of the site or not build a frames version. I tend to just avoid the frames.. but would use them if I thought I needed to.
On the preventing scrolling you can set the property of a frame like such: <Frame SCROLLING=NO SRC="page.html"> this will prevent scrollbars from ever showing up nomatter how large the page in the frame.
Lee
My meory is a bit foggy on all the browser incompatibility issues since I usually didnt solve them till after 2am.. but I believe that NS doesn't respond to onmouseover, it will respond to onmouseclick I believe. It depends on if it is an image or link that your trying to do this on as nothing seems to be consistant between IE and NS nor with compatability to the specs...
If you post the code it might give me some better ideas as to what your doing.
Lee
Here's an easy way to do it if you are doing jsp.
Just print your data into a simple HTML table and up near the top of the jsp change the mime type with this command:

This will cause the browser to open into excel and display the table as a spreadsheet. The user can then save it to their hard drive. This method is somewhat limited but its a quick and easy!
Lee
Glad to help Gaurav!
I can understand how confusing these simple things can be since they work a bit diferently then other languages. I think explaining it even made it more solid on my end! good rule if you think you understand it try explaining it! )

Good luck!
Lee
I believe your problem is that you can't have a static automatic(local) variable
static void nnn()
{
static int i = 1;
}
if you remove the static keyword it compiles fine.(note: local variables cant have access modifiers only thing that would work is the final keyword)
Lee
also static methods cant be abstract, if the were then you could not override them when creating a subclass!
[This message has been edited by Lee Clarke (edited February 02, 2001).]
[This message has been edited by Lee Clarke (edited February 02, 2001).]


case 1. while( (b=!a) )
case 2. while( (b==!a))
In case 1 the result of inner expression (b=!a), should be true if b can be assigned value of !a.
In case 2 the result of inner expression (b==!a), should be true if b is equal to !a.
So what I am trying to say is how does while(b=!a) treated in java?
Does it assign the value to b and check whether b is true or false?
OR
It checks whether the expression (b=!a) was true or not, I mean if there was a condition say (b>a) where b=5 and a is 3 will it return true?
I am a C/C++ background, and I think in C/C++ statement
like while(a=5) will put it in infinite loop.


humm lost to answer here..I'll take a shot at each one..
part of the issue might be the order of prescidence of the operators, ! is higher then =
also remember a while() must evaluate to a boolean it can only result in true or false.
ok while(b=!a) will evaluate to the result of the equasion and set b to the value !a or another way to state it would be while(!a) but then your leaving out the assignment of b.
"(b>a) where b=5 and a is 3 will it return true?" yep that would be true and unless b or a changes, you would get an infinant loop.

while(a=5) : on this it wont compile because a=5 does not evaluate to a boolean, now while(a==5) will evaluate to a boolean the results depending on the value of a.
Does that make more since?
Lee
[This message has been edited by Lee Clarke (edited February 02, 2001).]
[This message has been edited by Lee Clarke (edited February 02, 2001).]
Gaurav,
What you might be missing is the the while(b=!b) only contains one = sign its a common mistake that I am just braking my self which is to mistake things like (b=!b) as (b==!b) if you solve for (b=!b) it and b=true it workd out like this
b= (!true)
b=false there fore it would be the same as while(false) which will always exit the while.
Hope that helps!
Lee