armando fonseca

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

Recent posts by armando fonseca

Thanks everybody, all the friendly tips are convincing me even more to take the challenge... I want to do the SCJD so deadly... but my future position wants me to become a C++ guru, plus full time school is hard to manage time to start working with the SCJD....
The SCJD seems a lot fun comparing to the SCJP... either way, Thanks again.


Nitish Bangera wrote:well its just passion and love for knowledge.Also SCJA covers much more in theory.Come to think of it why do SCJP....can't you go directly and give SCEA.

Well, the SCEA is an architect series.. I think you need some year of experience for a certification like that. I consider that going to SCJP and then SCEA is not a backward logic. SCJP is the java language , SCEA is architecture.
What you might wanted to say( or a similar semi-backward logic) is an SCEA holder preparing for the SCJP... ( which is not that illogic if the scea holder wants to do programming)...
I'm just curious, perhaps I will take it too...
Hi, Since I passed the scjp, I don't know what is the next thing to do for programming. I felt that the SCJP didn't fill my hunger for software development. Personally, I don't like languages in particular but I like the challenge of building things and I think the SCJD can fill that enjoyment. Currently, I'm in my final semester and I'm sharping my C++ skills ( I got a job offer after graduation and they don't use JAVA at all) on my free time so I don't think taking the SCJD is an intelligent idea, but my heart is telling me to take it...(difficult dilemma, haha)... anyways, If I take the SCJD challenge, besides the monhouse's book and the K&B-SCJD-pdf book,
What other books should I get?
I have little-to-none experience using GUI, RMI, locking and all the foreign keywords that I find in the SCJD. (At school, I was never exposed to those technologies, just CS theory, mathematics, and general programming).
I'm little bit afraid of the SCJD but I know that I can do it with the help of some java literature books.
SO, can anyone recomend me a list of good books beside the monkhouse's SCJD preparation ?
I tried to find the list in the forum, but almost everyone points to the monkhouse's book. I'm going to get that book, but you all guys are experts, I'm just a newbie , so I think I might need some other books as well.


Henry Wong wrote:

but I see scjp ranchers studying for the scja...

Can you provide some links to JR topics pertaining to this?


Hi henry, I found many rancher's signature profile saying: "SCJP x.0, SCJA in progress..." or similar to it.
But here are some discussion links to it:

I'm not thinking of getting the scja, but I see scjp ranchers studying for the scja, can any one tell me what is the benefit of doing this? I don't want to say that is a non-logical route, because I'm not 100% familiar with the SCJA( I know it has UML and knowledge of different java technologies) but even for adding this message is hard to know if it belongs to the SCJP or SCJA forum because of the scjp-to-scja backward logic.


Jesper Young wrote:

armando fonseca wrote:Numbers between -128 and 127 will give true when using wrappers and the equality ==.

But that is in this case not why the second answer is 'true'!

The fact that == returns true in some cases is because classes like Integer have a cache of Integer objects for all the values between -128 and 127, and if you call Integer.valueOf(int) with a value in that range, the method will return an Integer object from the cache. Note that autoboxing calls Integer.valueOf(int) to automatically box an integer.

In the case above, S2 is created with the new operator. It is not an object from the cache - even though the value is 7. When you compare it to an object from the cache, the result will be false.

You are right... I'm a shame.... just keep it between us.
Numbers between -128 and 127 will give true when using wrappers and the equality ==.
Now, if you want to know why is the implementation that way , i will recomend you to look the jls. You don't need to know the why of the implemenation for the scjp but basically it has something to do with memory optimization.
Hello Chris,

Since you are passing the mock exams, I don't think your problem has something to do of how much you don't know about the SCJP's objectives.
What the problem can be is lot pressure to do well or anxiety or fear to fail that stops you to do well during the real exam.
Either way, I think you are already a winner, because the toughest thing to do of SCJP is to have the will to get up when you fail to the ground.
If I where you, I will take as much mock test possible, so get used to to the real exam.
That happens to me, I was afraid to fail after a long time of hard work, but when I sat down for the test, I felt it was just like another mock test.

Good luck, and keep the hard work my friend!


Anastasia Sirotenko wrote:

armando fonseca wrote:hey guys, i'm trying to find a way using default package or in other words, not using a package name space.

I don't see a way to do this. The F class inside the main() method shadows the outer F class. And if i am right, the same way as you cannot reach the shadowed variables, you cannot reach the shadowed class...

I totally agree with you, I don't think there is a way of it, but I'm not 100% certain.
BTW, I forgot to disclaim the the code that I posted is mine... just in case a rancher asked me where I got it.

hey guys, i'm trying to find a way using default package or in other words, not using a package name space.
After doing a search in the forum, I couldn't find an answer for my question. If you see the code below, I would like to access the F class with the message: "Top level class"class. I want to use default package, is there any way to get access to the top level class F?
I don't think there is a one if using default package, but I'm not sure...

is this a homework? or an assignment ? there is a policy about question regarding those scenario. You can use String methods, or regex if you are comfortable with it.
15 years ago
You have to understand one thing: Compile time and Run Time

At Compile time, the only thing the compiler does is to check a if the reference type and what is referring to have a parent-child relationship. (hi Ruben I apologize if I'm missing any other task that the compiler does , but please let me know if I'm missing something important!)
So you still have to follow the header of super method. So let if the super method throws a checked exception , you must catch it or declared in the current method. Also another gotcha is in covariance return, for example:
A code created by me:

At run time is where overridden happens, and it will choose the sub class method.

Correct me if I'm wrong ruben , but I don't see widening, I see a narrowing and then boxing:
Short <- short <- byte <- int

is my assumption correct?