Vijay Raj

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

Recent posts by Vijay Raj

Hi,

I was going through the Java 6 Platform Revealed book. It mentions about the new NavigableMap interface. In there, it has mentioned about three methods - navigableSubMap, navigableHeadMap and
navigableTailMap. But I am not able to find it in the Java API documentation (http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentNavigableMap.html). I even searched the index but could not find these methods? Where have they gone?

I was able to find them in here - http://oss.org.cn/ossdocs/java/se/jdk6/docs/api/java/util/concurrent/ConcurrentNavigableMap.html

Regards,
Vijay.
14 years ago
It depends upon the underlying OS because the JVM (or most of the JVMs) pass on the the Java threads to the system's thread implementation. So UNIX systems will implement in a particular way, Windows in some other way.

Even under two UNIX systems, its not assured in the JVM spec that the order of thread execution will be the same because it also depends upon the CPU and memory usage.

Vijay.
You don't even have to instantiate the SuperSuperClass. Just do the following -



Regards.
Thanks Henry.

I was under the impression that every bucket has an unique hashcode assigned to it.

Correct me if I am wrong - Rehashing will require more number of buckets. Like you said, if we had 10 buckets and its increased to 20 buckets, the range of possible hashcodes will now be divided into 20 groups. Is this where rehashing is done?

Regards,
Vijay.
15 years ago
In a HashMap (or any other hash data structure in Java), the hashcode is used to determine the 'bucket' in which the value is present. So, I feel the 'buckets' are only created when the hashmap gets a new item with a new hashcode. I don't know whether the question makes any sense or not but here I go -

How will rehashing be done if we keep getting the items with the same hashcode? Or may be the question is - What will be 'rehashed' if we keep getting items with the same hashcode?

Regards,
Vijay.
15 years ago
I am actually trying to find how to get a BufferedImage from a java.awt.Image?

Vijay.
15 years ago
Oh really! Can that be done?

Get the image in a byte stream, read the byte, then?

VIjay.
15 years ago
Its actually an image with a white background. Its not transparent.

Vijay.
15 years ago
I use a third party API to generate a barcode. It gives me a java.awt.Image. Is there a way to set the background color of the java.awt.Image to RED? The API has none.

I went through the Java API but could not find it.

Vijay.
15 years ago
Santosh,
Please do not steal other's post. If you have questions to ask, make a new thread.

Balakrishna,
Even you should not have answered him.

To answer Balakrishna's original question, methods are called based on the runtime object. So, at runtime, the variable obj has an object of Derived class. So, Derived class' method will be called. But the compiler looks for method based on the type of the variable. So, if you declare a method in base class, the compiler will compile and at runtime, the actual object's method will be called.

Vijay.

I spoke to the NIIT guys and it indeed is MM/DD/YYYY.

Thanks harilal.
I am sorry guys. Its the Certification voucher and not the certificate itself

I called the Prometric guys and they said it should be MM/DD/YYYY but it depends upon the vendor (NIIT in my case). So what you guys are saying might be true, it MIGHT be MM/DD/YYYY.

I am trying to call NIIT guys but no one is picking up the phone. Anyone knows whoem to contact at NIIT for vouchers.

Vijay.
Hi,

I bought a SCJP certificate at a discounted rate from NIIT. The expiry date mentioned in that is 03/04/2009. I do not know whether its 4th March or 3rd April.

Anyone here who knows it?

Regards,
Vijay.

Vijay.

[removed some 'not so nice' suggestions]
What are you not able to understand? Be specific when you ask questions, we can't read your mind.

Vijay.