Q:

In Java, is it possible to use elements/functions of a class in another class? 

Say I have a class Foo.java and a class Bar.java.  They are in the same package. 
Say Foo.java looks like this:
public class Foo {
    public Foo () {
        //insert awt graphics shape here
    }
}

And Bar.java looks like this:
public class Bar {
    public Bar () {
        //filler
    }
}

For Bar.java, would there be any way to access the shape created in Foo.java? 

A:

The answer to your question is yes, you can.  You probably can accomplish this through composition.  For instance:
public class Foo {
    private Bar bar = new Bar();

    public Foo () {
        this.bar.getSomeVal();
    }
}

public class Bar {
    private int someVal;
    public Bar () {
        this.someVal = 10;
    }

    public int getSomeVal() { // this is just an example method. 
        return this.someVal;
    }
}

As you can see above, the Foo class contains an instance of the Bar class.  Using that instance I can access in the Foo's constructor the members of the Bar class.  
You can follow the same approach in the Bar class by having an instance of the Foo class. 
You also have the option to use static methods, for instance:
public class Foo {
    public Foo () {
        System.out.println(Bar.getSomeVal());
    }
}

public class Bar {
    private static int someVal;
    public Bar () {
    }

    public stating int getSomeVal() { // this is just an example static method. 
        return Bar.someVal;
    }
}

