MaheshS Kumbhar

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

Recent posts by MaheshS Kumbhar

Yes, hashcod will give the hashcode representation of InetAddress object, but this is not what I want. I want the integer reprsentation of the IP address string. For example, suppose IP address is "192.168.1.0", then I want the integer value of this IP address. I can get integer value from this manually by doing [192*(256^3)+168*(256^2)+1*256+0]

Is there any in-built function that can do this for me?

13 years ago
Hi

I need to know, is there any in-built function available that can convert the IP address to an integer value. I can do it by writing own function, but I want to know if is there any in-built function available?

Thanks in advacne
13 years ago
Hello All

I have done SCWCD certification recently and wanted to do Web Services Certification. I just want to know which book I should refer to.

Thanks in advance.
Do we need to mark the class as final as well as throw an exception from constructor so that reflection cant create one more instance of the class?



Also we need to override clone method so that the another instance cannot be created by cloning.
Are there any more constraints that need to be used to make any class to follow singleton pattern?
14 years ago
Is StrutsPrepareAndExecuteFilter implemented as singleton pattern object to process request?
14 years ago
I read below statement on Javadoc for Vector which said
"The Iterators returned by Vector's iterator and listIterator methods are fail-fast: if the Vector is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException."

Here, what does it mean by structurally modifying the the Vector collection?
14 years ago
I read on one site http://www.java-questions.com/collections_interview_questions.html
that, A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent.
But what I read on Javadoc, that said, we have capacity and capacityIncrement variables, that actually decide by what value, the arraylist or vectors array size should be increased. That means we can control the array size when it falls out of size. Then what does the statement listed in above site mean?
14 years ago
If we need to maintain the session, so that different actions results can access the objects created by one action, then these objects need to be saved in session object or in the value stack itself?
And once again I want to inturrupt the same topic.
I had read on apache struts site that said,
"If you are looking for an object then Struts will look into the whole value stack for the object. If you directly specify a property, then its looked only into the object which is on top of the value stack."

Here they told that, struts will look into the whole value stack for the object we specify until it finds, then is this information is with respect to single http request response cycle.
14 years ago
Thanks Seetharaman, now my doubt is clear.
14 years ago
Hi Joe
Does this mean, if one action class puts an one object onto value stack and its result page jsp displays that object put onto top of value stack; this way one http request response completes. Now user makes another request by clicking some link on that jsp page which will invoke different action class and in turn will act as new http request. Now my question is, cant this new action's result type(JSP page) access the object put on value stack by first action?
14 years ago
Hi David
I got the meaning for volatile keyword, which will ensure that master copy is always kept up to date. But my question is why cant we achieve the same with static variable. Because there is only one copy of static variable and will be shared by all the threads. So when one thread updates the value of static shutdown variable to false, the other thread can access the static shutdown[which is only copy of static variable shared across all threads] and will stop running.
14 years ago
I got the information on volatile keyword as, its value is never cached thread-locally. So that means, all threads share a single copy of variable marked volatile. So we can achieve the same with static variable also, then what is difference between static modifier and volatile? What is the example/scenario where volatile keyword must be used?
14 years ago
I have a very basic question that could be really silly but I am curious to know this

Suppose we have one web application, where several objects are put into Value stack during its operation. My question, is does Value stack overflow at some time?

Please guide me if I am wrong.
14 years ago


My question here is, can the column name "nonPrimary" be non-primary column in class "def"?