Vicken Karaoghlanian

Ranch Hand
+ Follow
since Jul 21, 2003
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Vicken Karaoghlanian

Congratulations man, another certificate added to your growing list.
12 years ago
9/10 The Cat
12 years ago
Here goes another reason to ditch IE (The cookie eater).
12 years ago
That clip is a parody for a movie called A Night at the Roxbury, starring Will Ferrell and Chris Kattan... terrible movie IMO.
12 years ago
Try to configure the Cookie options from Tools--Options--Cookies.

Possible scenarios why this is happening
1) You added JR to your cookie exception list.
2) "Keep Cookies" combo is set to "until i close Firefox".
3) "Allow sites to set cookies" is not set.
12 years ago
One word people: Farting
12 years ago

Originally posted by rathi ji:
Vivek ,
In second case also , object will be eligible for GC as soon as the method will get complete .


Yes that is true, but the real question is how soon the object will be EGC. Get it?

It is really frustrating how people misspell my name , it is not Vicky, Vivek, Velder, or any other awkward combination. It is simply pronounced V-I-C-K-E-N, think of it as a combination of Vicky and Ken (just drop the y). Thank you for your time and happy ranching.

My apologies rathi if i sounded harsh, nothing personal is intended.
[ February 05, 2005: Message edited by: Vicken Karaoghlanian ]
In your first example, 'MyClass' object will be eligible for GC iff:
1) You explicitly set its reference to null.
2) Class 'Other' is EGC

However in the second example the object will be eligible for GC as soon as m() method exits.

From Memory-Usage point of view, i'll go with the second code sample.
Try using the split("\\s") method to split the string into an array and then do a reverse loop through its elements.

You don't have to use the StringTokenizer class.
[ February 03, 2005: Message edited by: Vicken Karaoghlanian ]
13 years ago
It looks like you have to be a geek in order to take a piss. :roll:
13 years ago
[JM] Unless performance is a problem, don't sacrifice reusability for performance.

That is true. However, the issue in question here is to know the "quickest" way to calculate the mean and NOT the best way to calculate it, now for me this sounds more like a performance question rather than a reusability question, and the direct answer to it would be not to use loops. Although I agree that the correct and most appropriate way to calculate the mean is indeed through the use of loops (as Joel suggested), I don't believe it is the accurate answer for this question.
13 years ago
Simply put...
  • Primitive types (short, char, byte, int, long, float, double) are allocated in the Stack.
  • Object are allocated in the heap, while their references are allocated in the Stack.
  • Objects in the heap are subject to Garbage Collection while primitives in the Stack are not.


  • For more general info how Stack and Heap memory work see this.
    [ January 27, 2005: Message edited by: Vicken Karaoghlanian ]
    13 years ago
    Sorry to say this but that method become deprecated long time ago.
    13 years ago
    Using loops doesn't make your code more efficient (quicker), it simply make it more dynamic, readable and easy to write. In this given case I would have avoided using the unnecessary loop if performance is what you�re after.

    The performance here will not be noticeable of course regardless you are using loops or not, but this just me nitpicking.
    13 years ago