Connection of arduino to java Netbeans How to connect Arduino UNO to Netbeans (java)?
Because I want to input flood height taken using ultrasonic sensor to Netbeans.
Thanks for the help.
To do this, you essentially have to code up a version of the Arduino serial monitor within Java (i.e. write Java code to listen to a serial port and recieve bytes from it).

I found an example that might help you-https://playground.arduino.cc/Interfacing/Java