Ramakrishna Nalla

Ranch Hand
+ Follow
since Apr 21, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ramakrishna Nalla


Originally posted by:sameer inamdar
can we say that.
The reference to inner object is independent to the reference of Outer object.



Yes..my above program showing that only...

I need All your replies...

your replies will be appreciate...Waiting..

RK
Is this pictures resemblance inner and outer objects relation ship?

Thank you..
Hi All..
I need a clarification regarding innner classes
Please go through below code:


After explicitly assiging null value to outer class reference variable.. how it still able to access variable i?
why relation ship not borken between inner object and outer object...even after assigning null to outer object?

Is my self satisfaction answer correct?
Inner class object does't depend on outer class reference...to invoke outer class member...
becuase the outer instance address already known to inner onject when it is instantied..

Thus inner object can access outer member even after outer object assigned to 'null'.




Is it possible to break relationship?

Thank you for reading my big query...
I will be greatful for your comments...

Regards..
Ramakrishna Nalla
[ July 25, 2005: Message edited by: Ramakrishna Nalla ]
Hi Satya...we can do in both wasy as you mentioned

Go through below LEGAL code...

Thank You Mark...for your great reply...
So much Thanks Barend..for correcting me...and also Marzo Kaahn...
Once again thanks to Barry...

I just think like below code hence that question arises for me..


Thanks to ALL..for your valuable replies..
I am asking for... way of code presentation by SUN
Which type of coding format shown in Real Exam

STYLE 1


STYLE 2

STYLE 3


Or
any style can be used or styles can be mixed...it just depends upon porgram code...

And one thing:

Is there any Drag and Drop questions in SCJP 1.4 ? or only for 1.5

Thanks
[ July 24, 2005: Message edited by: Ramakrishna Nalla ]
Thank you hatim and Barry...

You may misunderstood my question...

By Barry:

static methods cannot be overridden. So it is useless declaring a static method in an interface, because nothing can provide its implementation.



Is there any rule static Vs interface...just like rule abstract Vs final
OR
Java Developers just thinks that..there is no need of static methods in interface...and put that reststriction...interface methods can't have body..
and given a STRONG Defination for interface...


Is there any problem... if we have static methods too along with method declaration in interface... (of course if Java Developers allowed)..

Thanks in Advacne....Waiting....
Abstract class can have static methods...
while it is illegal for interfaces...Why?

What rules are opposing to having static methods in interfaces?

Please clarify me..with your replies..

Thanks
of course it's possible...please mention me if i am wrong


Thank You
[ July 24, 2005: Message edited by: Ramakrishna Nalla ]
Hi..ALL

Is this type of questions also asked in REAL exam...


Then i need to brush up on OS and related this..

Please clear me...
Constructor only belongs to class...they can't be overlaoded or overrided..Because constructors not inherited to subclasses...

Overloading and overriding possible only when the members inherited to
sublcass.

constructor:
In my view constructor are not class memebers, so not inherited to subclasses

methods:
Methods intherited to subclass(of course only public and default also final)so can be overloaded and overrided.
final methods only overloaded, can't be overrided

instance variables:
inherited to subclasses, if subclass defines same variable then subclass hides(overrides) the inherited variable

Go through this followig code you will be more clearer...( I AM SURE)



Regards
RamaKrishna Nalla

[ July 24, 2005: Message edited by: Ramakrishna Nalla ]
[ July 24, 2005: Message edited by: Ramakrishna Nalla ]


Actually..no Thread object instantiated...so no thread process Use Thread class constructor to instantiate a thread object

For example:

Thread t = new Thread(Runnable Object);

and to start process(to invoke run method) call start method:

t.start();//it will invokes run() method which is overrieden

After all these steps...We are able to run a thread...


Reagards

RK


Attempting to use == to compare reference variables for objects in different class hierarchies will result in a compiler error.



I think this rule fits to instanceof operator....like this:

Attempting to use instanceofoperator between reference variables for objects in different class hierarchies will result in a compiler error.

Please let me know....if i am wrong....

Thanks
[ July 20, 2005: Message edited by: Ramakrishna Nalla ]