All pastes #268378 Raw Edit

Stuff

public java v1 · immutable
·published 2006-12-05 18:09 UTC
rendered paste body
/*class A*/public class A {	public Object obj;	public A(B b) {		obj  = b;	}}/*class B*/public class B {	int example = 1;	public int getValue() {		return example;	}}/*main*/public class Example {	public static void main(String args[]) {		A a = new A(new B());		a.obj.getValue();	}}/*compiler: * javac Example.java  * Example.java:4: cannot find symbol * symbol  : method getValue() * location: class java.lang.Object *               a.obj.getValue(); *                    ^ *  1 error */