Ameem Shaik

Greenhorn
+ Follow
since May 24, 2010
Merit badge: grant badges
For More
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ameem Shaik

Thanks for the quick replies. It seems I misunderstood my texts, but it is clear to me now.
13 years ago
I have seen two different suggestions:
HFJ recommends However another source I am looking at suggests

Which is recommended? To me, it makes more sense to use public, since the value is already marked final, and cannot be changed anyways. But I am a beginner programmer, so I don't know much yet.

Thanks
13 years ago
Thank you both for the help! It is now clear to me.
13 years ago
Hi, I need clarification about why these two scenarios produce different type of results.
When you have something like:


y=3, not 7.

However, when you have something like this:


a.size =20, not 10.

What causes this difference? I'm guessing it has to do something with the difference in primitive variables and object reference variables, but I'm not entirely sure. I'm new to both Java and programming in general, so can someone explain this to me? Thanks.

13 years ago