Loading...
Engaged Employer
making sure the output for word count is correct
Anonymous
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.
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; }
count the number of spaces, tabs and new lines.
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalized job recommendations and updates by starting your searches.