Link to home
Start Free TrialLog in
Avatar of TheMeeser
TheMeeser

asked on

Accessing variable is other calsses

I also want to access a variable recevieBuffer or a method receivedData(). However they are in another class within the same .java file and the same project. I have a the following classes:

public class Simulation extends UiApplication
 
which is the class that I want to use the variable in
and

class SPPScreen extends MainScreen implements BluetoothSerialPortListener
 
which is the class that contains the variable.

How could I access the variable or the method from the Simulation class?
ASKER CERTIFIED SOLUTION
Avatar of bglodde
bglodde
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JConchie
JConchie

The meeser......you may want to grade and close some of your previous questions.......or at least respond to the advice given....before asking anymore.
Avatar of TheMeeser

ASKER

This helped me out alot, but it took me a little bit to figure out how to do the public accessor part.

Thanks
Thanks for the tip JConchie :) I have never used anything like this before and wasn't sure how it worked.