Pergunta de entrevista da empresa Salesforce

making sure the output for word count is correct

Respostas da entrevista

Sigiloso

1 de nov. de 2010

i said i will regenerate the file with the same and number of words. if both files are of same size that means output is correct.

Sigiloso

13 de set. de 2011

public boolean wordCountVerification(File file) { if (file.isFile() && file.exists()) { s File newFile = new File(file.getPath()); long fileSize = file.length(); long newFileSize = newFile.length(); if (fileSize == newFileSize ) return true; return false; } return false; }

Sigiloso

8 de set. de 2012

count the number of spaces, tabs and new lines.