First you have to get all divs by using driver.findElements function.
This will get you list of all webelements in form of List<WebElement>.
List<WebElement> allElements = driver.findElements(By.xpath("your/xpath/here"));
Now you can get the last WebElement by using get function and passing your list size - 1.
WebElement lastElement = allElements.get(allElements.size()-1);
Hope that helps.