Netty poestel

Ranch Hand
+ Follow
since Sep 20, 2004
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 Netty poestel

Firstly, I am fully aware that this sort of post belongs to a different section of the forum but I started out here and I think this would be the most befitting place to end this little saga of mine

I had bumped into this forum a few months back and started of with questions like " what's the meaning of ~6" and "how does one do binary-arithmetic"......looking back..., if I'm confronted with these kind of questions by someone on the forum today :roll: , my first thought would be,[ranging from] "oh my Gawd, this person should not be trying this exam at all" to "that's a compleeeeetely lost case"........but then I went for it.
With someone starting from scratch and with no Java experience at all [ yes, please repeat after me .....I do not have any JAVA experience, ] and with 3 kids at home and commuting to and fro from a full time job, which incidentally takes a 3 hrs. chunk of my daily schedule, what were the real odds that I was ever going to get through this exam. Let me give you an honest answer,

in an array defined as:-

Had it not been for this forum, I am being very honest here, the above array would have run the way it should, ......but it did not happen like that, what eventually happened was this:-

The past few weeks were quiet excruciating specially with the family getting pretty p*&%#d off [sorry for the 6 letter word here] , as I was spending more and more time with things called as 'mock exams' than with real live people........ am I glad this punishment is now over. I want to thank all the people who took the trouble to take to their keyboards answering my quirky mails , even-though
[and possibly] they must have had "God, she doesn't stand a chance" at the back of their minds.
You all...... were brave too !

All right amigos, it's time to sign off now and ....... and knowing the Gatemaster,the keymaster,the great Ostiarius shall remove this post , my famous last words:-

as to some obscure example in the Strings/Wrapper chapter of a very well known book........... "The Ranch rules".

arrivederci, Auf Wiedersehen en tot ziens
off to the gallows tomorrow...
see if I survive and come back...

G'bye cruel world
Going through a mock ,asking;-

show the line that suggests the value x closest to a 'double' value y

-int x = (int) Math.ceil(y);
-int x = (int) Math.floor(y);
-int x = (int) Math.round(y);

I'm having doubts choosing between 'ceil' and 'round'.
It's indeed a mock but my doubts rose, maybe due to the fact that I may not be interpretting the article "" in the right way...

but Thx. none-the-less

Question:- "After what line the MyClass object created at line 1 will be eligible for GC?"

I would go for Line 6, since at line 6, x starts pointing to a new MyClassObject and there remains no reference to the original MyClass object.
But there's a different school of thoughts that also says i.e when main() completes.

any thoughts here ?
[ December 26, 2004: Message edited by: Netty poestel ]
a very quick question:-
is (e.g):-

"class x extends package.class_y " ...valid ?
Hi Erin

for my sake ...I'm going for:


absolutely right, from that point of context.
But......the subtle difference is, if one declares multiple variables in the same statement such as: int[] i, j; and int i[], j;, then j is not of the same type.
In the first case, j is an array of integers while in the second case, j is just an integer.
[ December 18, 2004: Message edited by: Netty poestel ]
finally got it....
I was on the fact that there's a subtle difference between: int[] i; and int i[];
anyone care to explain--> "In the expression: b has 0 [] ..."
this one's eluding me

Q:-which of the following lines of code could be inserted at line 7, and still allow the code to
compile? (Choose four that would work.)
A. b2[0][1] = b;
B. b[0][0] = b3;
C. b2[1][1][0] = b[0][0];
D. b2[1][2][0] = b;
E. b2[0][1][0][0] = b[0][0];
F. b2[0][1] = big;

Now Correct me if I am wrong here.

The answer given to this question is:

12. A, B, E, and F. This question covers the issue of, �What can I assign to an array reference
variable?� The key is to get the dimensions right. For example, if an array is declared as a
two-dimensional array, you can�t assign a one-dimensional array to a one-dimensional array
C is wrong because it tries to assign a primitive byte where a byte array (one dimension) is
expected. D is wrong because it tries to assign a two-dimensional array where a one-dimensional
array is expected.

while it was mentioned :
C. b2[1][1][0] = b[0][0]; // [2 -3 ]..? << 3-3 == 2-2 >> OK
D. b2[1][2][0] = b; // [0-3 ]..? << 3-3 != 2-0 >> Bad
E. b2[0][1][0][0] = b[0][0];// [2-4]..? << 3-4 != 2-2 >> Bad

[as per the book answer C and D are at fault and E is fine ]

if this is taking too much of an effort, let's forget this one,
"got bigger fish to fry"
Hello Mike

couldn't let this one pass by unnoticed:-

The best rule on this type of assignment is that the number of missing [] in the left-hand expression must match the number of missing [] in the right-hand expression.By "number of missing []" I mean subtract the number of [] in the expression from the number of [] in the original declaration of that array reference variable.

C. b2[1][1][0] = b[0][0]; // [2 -3 ]..?
D. b2[1][2][0] = b; // [0-3 ]..?
E. b2[0][1][0][0] = b[0][0];// [2-4]..?

could you pl. demo an example of this [] arithmetic with the given C,D and E
Thx again

I can atleast get it to work now.
For e.g this time around I could figure out myself what



(arr[3][1][0]) & arr[1][1][0])

shall yield.

I've drawn myself a sketch on an A4 and I think I have a hang on the 3ds.

can anyone put this 3-D array in a 'box' drawing , like the K&B book shows on arrays [ for e.g Lesson I, fig. 1-3].
a picture shall say > 1000 words

Thx. for any help
Yes I do see that it'll no longer have a def. constructor that's used in the main().