NitishK Kumar

Ranch Hand
+ Follow
since Oct 20, 2010
NitishK likes ...
Firefox Browser Chrome Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
11
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NitishK Kumar

I am developing an application in which I have to integrate facebook. But, whenever, I give reference of facebook SDK in my application, it does not take it. The process aborts at 73%. I downloaded SDK from github and I had also installed EGit eclipse plug-in. But still, I am unable to provide reference. I am not getting what is the actual problem. Whether is there any problem in eclipse or some other problem is there?
12 years ago

Matthew Brown wrote:What makes you think the capacity should be doubled? For instance, if you look at the Javadocs for the ensureCapacity method:

The new capacity is the larger of:

- The minimumCapacity argument.
- Twice the old capacity, plus 2.


If that's the behaviour whenever the capacity is increased, it would explain what you saw.



Thank you sir, I got the clarity
12 years ago

Jared Malcolm wrote:Which constructor are you using?

Better yet include the code you are using....if you can.



It has nothing to do anything with the constructor. Any way I am using StringBuffer().
12 years ago
Hi, I have a doubt regarding string buffer. The default size of string buffer is 16. If we go on adding the elements, then on exceeding the size, the capacity will get doubled. It should be 32. But the capacity() returns 34. How the size gets increased?
12 years ago

Bear Bibeault wrote:That is exactly the question that Henry addressed.

Let's turn this around -- why don't you explain why it should?



Sir, I got my answer, it was done to keep the language clean as assigning multiple meanings to single operator will lead to more programming errors. Why I got this doubt because people say that it doesn't support operator overloading, while actually it does. For instance, + is used in string concatenation as well as arithmetic operations and this in-built feature of java.
12 years ago
Sorry, my question is wrong. I mean to ask why it does not support user defined operator overloading.
12 years ago
Why Java does n't support operator overloading?
12 years ago
Hi, can we commit response in the response buffer explicitly?
13 years ago
Hi, I am planning to learn EJB. Is it required to learn ejb2 prior to ejb3.

Bear Bibeault wrote:It returns the container's implementation of the ServletContext interface.



I mean to ask that generally a method is invoked on an object and getServletContext() is in servletconfig interface. So, how container locates the servletconfig object.

For eg:
We write as follows



Similarly, here also it should be as . So how the container locates the servletconfig object?
13 years ago
Hi I want to know what happens when we write:

13 years ago

Lucky J Verma wrote:Static Variable= Defined at Class Level
Instance Variable =Defined at Instace/Object Level.

Static Variables are initialized ,loaded with Class itself.

But instance variable initialized when Object for that Class is instantiated.

In other words - For 1 class ,its different objects can have different values for same instance variable.(Each instance =can have its own value)
But for same class ,static variable (since belongs to class itself ) -same value is shared by each object.




Thank you Lucky Sir, Actually this was my doubt which I wanted to clear.
13 years ago
What is the difference between static and instance variable?
13 years ago
I solved my problem and now its working.