SkitteryVenus7:
But i am not able to understand how to delete all the data from arduino using java.
I am confused. Your title suggests you want to delete a program but your Original Post says you want to delete data.
The easiest way to delete a program is to upload the example Blink program in its place.
If you really mean that you want to delete data then you need to tell us what the data is.
Maybe a solution is to have a function within your Arduino program that deletes data in response to a message from your Java program.
...R