 Table of Contents
Table of Contents  Previous Section
Previous Section
 
 
 Java Programming Pitfalls
When debugging Java code, watch out for the following tricky spots:
	public class MyComponent extends Component {
		public void myMethod() { .... }
		//WRONG! Overloaded method causes runtime error.
		public void myMethod(int anInt) { ... }
	}
// From a component's Java file. ((Session)session()).verify();
By definition, session returns a WebSession object. Because WebSession does not define a method named verify, your code won't compile unless you cast the return value of session to your WebSession subclass.