Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Swastik Dey

+ Follow
since Jan 08, 2009
Swastik likes ...
Android Eclipse IDE Java Java ME
Kolkata, West Bengal, India
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Swastik Dey

There appears to be sum issue in the api.  It's probably not releasing the lock.  Just printing a list unlikely to lead any concurrentmodificationexception.
4 days ago
You have posted most of the code.  If you show the missing classes, we might be able to compile and see what's going wrong.
Do you mean you wish to store information retrieved in servlet in an array list?
1 month ago

Hema Latha M S wrote:Can anyone tell me the reason why cant i call super() or why cant i use super in the very first line inside the class, but we can use same inside methods or constructor

Is it syntactically correct?

Inside a class body you can declare variables,methods and constructors, and from within any method or constructor you can call some other.
So your requirement is , considering the given value for Jan you have to display the calendar of given month?
3 months ago
What value janFirst contain.   Is this fixed value.
3 months ago
Ok..then even things are getting complicated.  You can use Calendar, class it would be much easier.
3 months ago
What is the reason behind starting from January?  Why not start from the 1st of the given month and year itself.
3 months ago

What is happening in the above line?
3 months ago
One problem as per my understanding is your return statement is out side the loop, so it will print only when the loop terminates.  You either need some sort of recursive function or the print statement should be inside the loop itself.
3 months ago
What is your compile sdk version.  Since api 26 it uses Java’s generics automatic type inference and you don't need to do manual type cast.
3 months ago

Crystal Zeng wrote:

Campbell Ritchie wrote:How can Hippo have the name if it can't touch it?

You have a big box, and you can't open it by hand directly , you need a key to open it. In this situation, you say to people ,"No, I don't have a box."

I would rather say, you can't access the box, let me know what you want from the box, I will supply back whatever is there.  getName() supplying back the name.
4 months ago

Crystal Zeng wrote:A class is a blueprint for its object.An object is designed based on its members. If Hippo has no members called name, why Hippo's name data exist? It seems strange.

The name data doesn't exist in Hippo, rather it exists in it's parent animal, and you accessing it's through it's parent's(animal) class method getName().
4 months ago

You are saying Hippo has a name. If so , Where does the name come from ? From its superclass ,right? If so , why does it say that private members are not inherited?

Try this, I hope you will understand why it says pvt members are not inherited

4 months ago