Re: calling methods help
On 2005-08-10, Eric Sosman penned:
>
> a classB. (But the compiler isn't entirely trusting: if you
> happen to be wrong and `a' refers to a classZ instead, you'll
> get a ClassCastException at run-time.)
>
I think that happens because the compiler *is* entirely trusting.
--
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
.
Relevant Pages
- Re: name binding from one template to another
... during the first step of compiler look-up, ... the definition of template, how could it bind (generate binary code ... generating any binary code, let alone linking. ... which previously declared entity a name refers to. ... (microsoft.public.vc.language) - Re: Python 3K or Python 2.9?
... pointer/reference in their book on programming C++ or Java. ... refers to the current object inside that object's method. ... think knowing that the compiler is providing it is sufficient. ... I would mention that an instance is passed as the first parameter ... (comp.lang.python) - Re: A small exercise
... {final int a; final int b; ... Main.this.b refers to the enclosing *instance* ... which would be illegal which is why the compiler complains. ... instantiated which means that you are trying to initialize a blank final ... (comp.lang.java.programmer) - Re: Reversing a linked list
... The phrase "the implementation" refers to the compiler and standard ... If you are not the person who is responsible for implementing printf() ... (comp.lang.c) - Re: Question about GC
... > the JVM inspects a stack frame, does it consider an object reachable ... > if a local variable currently refers to it, ... The argument I use is that I believe it's legal for the compiler to generate ... (comp.lang.java.programmer) |
|