Forums Register Login

Inner Class & HAS-a class

+Pie Number of slices to send: Send
Hello ranchers !

I have quick question,

inner class = has-a class = delegation of task

class A class B {
{ || private C c;
void check () { || void add () {
|| c.add();
Inner i = new Inner(); } }
i.delegate();
}

just wanted to make sure that is that the same thing..
i know access modifiers along like static n outer does not have access to any of inner members but the reverse is true ..and all

thanks in advance

chintan
+Pie Number of slices to send: Send
sorry it's just kinda mix..

class A {

void test () {

Inner i = new Inner(); // it's the same thing of delegation or
i.check(); adding more power to class
}

class B {

private C c ;

void add () {

c.sum(); //here it's just delegation of function to other
class
}

just want to make sure it's the same thing or is there any other underlying features among them

-- sorry for the above
-- thanks in advance

-chintan
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 532 times.
Similar Threads
Evaluation Order.
operator precedence
Dan's || && question
URL encoding and arguments
Using Sun's Migration Tool...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:04:22.