It may be easier to answer your question if you post your code so we can use that as an example and have it be in context with your application. Here is a smaller example to try and illustrate it though.
We can start by defining two classes, Example1 and Example2. Example 2 will access data from Example1.
public class Example1
private String data1 = "this is my test data";
public String getData1()
public class Example2
public static void main(String args)
Example1 ex1 = new Example1();
String data = ext.getData1();
In this example, when we run the main method of the Example2 class, the first thing it does is create an object of type Example1.
We then use this object reference to obtain the value using an accessor method. Accessor methods are simply get/set methods that either set a value, or return a value. We assign the value from the accessor method to the local variable "data". Lastly, we print the value of data, which is the string from the Example1 class.
Hope that helps!