[ next ] [ prev ] [ contents ] Connascence and Java

Connascence of Type (static)

Connascence of type occurs whenever two components must agree on the same type.

Simple Example

  
int i;
...
i = 10;

 =>

  
String i;
...
i = 10;  // oops!

Calling Sequence

  
void doSomething (int[] numbers) { ... }

...

Vector v = new Vector();
...
doSomething(v);   // oops


[ next ] [ prev ] [ contents ] Copyright 2001 by Jim Weirich.
All rights reserved.