Create badneighbour.java

java file.. performing the same option iteratively