Forums Register Login

dynamic type binding

+Pie Number of slices to send: Send
hi all,
well the question basically is does Java supports dynamic type checking?

is the following concidered to be dynamic type binding.
say you have class1 and class2 implement the same interface interface1
+Pie Number of slices to send: Send
 

interface1 i;if(....) i=new class1();else i = new class2();



Yes this is Allowed
+Pie Number of slices to send: Send
I know it's allowed is it dynamic biinding ??
+Pie Number of slices to send: Send
 

Originally posted by aymane chetibi:
I know it's allowed is it dynamic biinding ??



No. Dynamic binding only comes into play when you start invoking the methods through the reference to the object you create.
Yup, yup, yup. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 544 times.
Similar Threads
Passing a refrence to another Class vs method
Java and Generics
Accessing component from main class.... Help!
Is this a Bug in Java
Please HELP...Devaka Exam Test 2 Number 69. I totally don't understand it.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:45:43.