This week’s task is to implement a binary search in Java, you need to write both iterative and recursive binary search algorithm. In computer scienc…