Pres Brawner

Ranch Hand
+ Follow
since Jan 18, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Pres Brawner

Thanks Tim!

How could I have been so stupid?

I trusted Ed Roman's Enterprise Java Beans, page 111. I guess books don't always contain the right answers!

I modified my code to reflect your recommendation. Eclipse still can't resolve the location, but at least I'm a step closer.

Thanks again!
Pres
Hi all,
I've got Eclipse 3.0 something and I'm trying to set up a sample session bean. While trying to construct my home object interface, I discovered that I can't see

import java.rmi.*;

I did the following:
Project -> Properties -> add Libraries
and added my 1.4.2_06

Still no joy.

Is there somewhere I can download the rmi jar by itself?

Is there some other way of waking Eclipse up?

Am I pointing to the right thing?

Ack!

Thanks all,
pres
Sign me up! Looks like a good book.
22 years ago
Duh!
I got it now.
d = infinity. (I thought it was NaN and hence the problem I was having with this.)
Thanks everyone.
Pres
Hmmm. I don't think so. NaN is a numerical constant (from the Double API)
A Not-a-Number (NaN) value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff8000000000000L).
Why would it return -1 in one case and 0 in the other? You are comparing NaN in both.
Any other ideas out there?
Thanks,
Pres
Hasanov was kind enough to contribute study questions the other day. Many thanks to you!
Here is something that caught my attention:
double d = 1/0.0;
byte b = (byte)d; //OK, b=-1
byte b = (byte)Double.NaN; //OK, b=0

Why is this? In d above d = NaN. Why does it get translated into -1 in one instance and 0 in the other?
I have read the Math API, I've gone to the JLS http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html#9208
I have looked at the Double API.
Please no requests to "look it up".
Any assistance would be greatly appreciated.
Pres
Those who don't <want to help by providing an answer>, <should not post>.
I know that much effort goes into this group, and that it volunteer. Thanks all for your efforts.
The answer to every question ever asked to this group is "Check the documentation. Your answer is there." You could just make this into an autoreply and close the doors.
I understand that noone offering advice will change their pattern of doing so. As an advice receiver, however, I feel that I have a right to throw an exception when the advice I get passed is a null.
If I've read the documentation and been confused by it, telling me to read it again won't help. Write what you want. If you want to help, then perhaps you should listen to what the people asking for help want to get. Your personal opinions on learning theory might be tempered by the needs of those of us that are preparing for the test.
Just a thought.
Pres
Sorry Jose,
I looked at the API, and I still don't know the answer. readFully has two forms. One involves the length of the file, but the other just "reads some bytes".
I can see how the length version might answer reading the file in a single pass. I don't see how this will work with a socket.
There is an increasing pattern in this group not to answer questions, but rather to point to documentation or ask the person asking the question, "What do you think?"
If I knew the answer, I wouldn't be posting. If you know the answer, please help me. If you know the answer and won't tell me, don't post.
Pres
I'm reading Mughal and on page 425 he's talking about Event Listeners. He says, "Notification of all listeners is not guarenteed to occur in the same thread. Access to any data shared between the listeners should be synchronized."
I'm not sure I get this. Where should the synchronized block go?
Thanks,
Pres
Valentin,
I think you're missing the point. Look carefully at your initial post. It can be viewed from two perspectives.
One: If you know the answer already provided is correct and want additional information, see this link.
Two: The original answer was incorrect. For the correct answer, follow this link.
I know you know what you mean. Please just let the rest of us in on it.
Thanks.
Thanks for the clarification. So... there are books on comparison huh?
It would be helpful if we were to know why we should look at this reference. Is the current explanation not sufficient?
Here you go heroes:
int x = 10;
float f = 10.0f;
x==f;
explanation:
x will be promoted to a float for the comparison and they will be the same value when that occurs.
Is this right?
I thought == meant "the same space in memory".
Thanks for clarifying.
This is an example from a study guide I'm using:
Class XX {
int i, j;
static int z;
}
x1 = new XX();
x2 = new XX();
x3 = new XX();
x1.z = 10;
x2.z = 20;
if (x2.z > x1.z){
}
The if statement is false because the two statements are equal.
I could use some help understanding this.
Thanks.
Very basic question.
I'm attempting to diagnose what is happening in a servlet. My usual way would be to put in an IDE and walkthrough the code debugger. Not an option this time.
The other course of action that I take is just to put System.out.println("whatever") to indicate location and status of some variables.
Where does that print in the case of a servlet? I'm using Orion and I'm not seeing the servlet container produce the diagnostic message, which is what I expected.
Thanks!
23 years ago