aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes dynamic type binding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "dynamic type binding " Watch "dynamic type binding " New topic
Author

dynamic type binding

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
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
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
interface1 i;if(....) i=new class1();else i = new class2();


Yes this is Allowed
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
I know it's allowed is it dynamic biinding ??
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
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.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: dynamic type binding
 
Similar Threads
Java and Generics
Passing a refrence to another Class vs method
Please HELP...Devaka Exam Test 2 Number 69. I totally don't understand it.
Is this a Bug in Java
Accessing component from main class.... Help!