Jaspreet Singh

Greenhorn
+ Follow
since Jul 07, 2005
Merit badge: grant badges
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 Jaspreet Singh

Eric,

That's one gem of an advice.
Thanks so much.

I think I'll continue to widen my knowledge of J2EE as my hobby and continue to be the part of the organization and look out for great business opportunities within it.

Btw, I work in Salomon Smith Barney. I was recently interview by Goldman, and the tech rounds were 100% success. In the last round on the last day of it, the management perhaps did not find me fit for what they do. They want their man resources to switch roles between debugging Perl systems, doing core Java, providing support, and doing things only remotely connected with a Developer's profile. I think it was fine for me, but perhaps they were looking for someone who is already doing so.

Thanks for the advice, it really is Gold.
17 years ago
Hi,

I am a Software Professional working here in USA in a Financial behemoth, it's the biggest in its league in the world.

Currently, I do J2EE and Java, which I'd like to do in my career. My firm's main focus is not technology or J2EE, it just uses J2EE.

I want to know which firms would have main focus on technology, specifically J2EE and Java, where I can expect to stay for a long time before my concern for technology starts ejecting me from the company.

Would it be IT Consulting firms like Accenture, IBM Global Services or others that would give emphasis to learning and using cutting edge technologies like J2EE? If yes, is there a possibility that they'd let me stick with the technology I like.

Seeking a career path from here on after having a satisfactory 4 years in the industry.

Thanks.
[ July 31, 2005: Message edited by: Jaspreet Singh ]
17 years ago

Originally posted by Ernest Friedman-Hill:
Nope. Only code in SubClass, or a subclass of SubClass, can call that protected method on a SubClass object. Extending MyObject is not enough. That's just how it works.

If you want to make the method available to other random code, then yes, you have to override it to make it a public method, as in your first example.



Ok, I'll live by that rule now. But I don't really understand the reasoning behind it.

Consider Object. It's clone() is protected. Now it is not available to any class in the Java World unless it redefines this method. While I don't know what's the spirit behind such an implementation, it definitely is not making use of code reuse, you see.
17 years ago
Well, in that case, if I make Test extend MyObject, it should enable calling sub.protectedmethod(); from MySubclass?

17 years ago


Why does a call to sub.protectedmethod() gives an error saying 'protectedmethod() not visible' ? Is not class MySubclass inheriting protectedmethod() from MyObject ?

The only way I get to compile this is by redefining protectedmethod() in MySubclass.



Now isn't that something that inheritence should do - bring a copy of protected methods (protectedmethod()) down to the Subclass? Why do I have to redefine it in the Subclass for it to be invoked?
17 years ago

The visibility modifiers (public, protected, and private) affect what other classes are allowed to call a method.



Well, if thats true, then making Test a subclass of MyObject should allow sub.protectedmethod(), isnt it? It still gives an error.

17 years ago


Why is CODE] sub.protectedmethod()[ [/CODE]giving a visibiliy error.

Why should it matter to visibility where from (Test) I am invoking the object's method, all that should matter is what is available to the object that I am invoking the method on. And of course, the protectedmethod() is available to MySubClass via inheritence from MyObject.
17 years ago
How can you make this code threadsafe, and get an exact value of 100000000 ?


The output is likely to be different every time you run this test. Here is what I got from two separate runs:

run1: Expected: 100000000 Actual: 45381942
run2: Expected: 100000000 Actual: 72689195

[ June 30, 2005: Message edited by: John Smith ][/QB]