Arduino Interfacing with Java

Hello Im new to arduino and have a question is it posible to change the variable value in the arduino code using the input from the java desktop application ? Sorry for my english not my first language :D Have a good day :)

is it posible to change the variable value in the arduino code using the input from the java desktop application ?

It is possible to write a Java application that communicates with the Serial port. It is possible to write Arduino code that reads from the serial port.

What you do with what you read from the port is up to you.