Handling webtables in selenium

We can extract an entire table element on a webpage from the table tag like

//table[@class='dataTable']

or

//*[@id="leftcontainer"]/table

Then entire body of the table except from the heading of table can be extracted like

//table[@class='dataTable']/tbody

Or

//*[@id="leftcontainer"]/table/tbody

Then if we want to choose an element in any row and col like lets say 3rd row and 4th col using

//*[@id="leftcontainer"]/table/tbody/tr[3]/td[4]

The below command will represent the data in third row and first column as column no is not specified and selenium scans elements from top to right and left to right and first column is the leftmost one

driver.findElement(By.xpath(//table[@class='dataTable']/tbody/tr[3]/td))

But if it is used with driver.findElements it will represent data in entire 3rd row and all the columns in that row.

driver.findElements(By.xpath(//table[@class='dataTable']/tbody/tr[3]/td))

The below command used represents all the rows in the table

//table[@class='dataTable']/tbody/tr // all rows

And Then the below command if used with driver.findElement, will represent the data in first row and fifth column as row number is not specified

dirver.findElement(By.xpath(//table[@class='dataTable']/tbody/tr/td[5]))