I have a non static method that I want to call in the main method of my application.
I'm getting this error: Non static method cannot be referenced in static context.
How can I fix this?
Thanks in advance!
This is the code for the method I want to call in public static void main:
Code:
public void sendData(){
while(true){
if(lb7.getText()==batteryStatus.getBatteryLifePercent2()){
iface.QWrite(envio1, 1, 1000);
}
else if(lb8.getText()==batteryStatus.getBatteryLifePercent2()){
iface.QWrite(envio2, 1, 1000);
}
}
}