// For complete examples and data files, please go to https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-Java
Comparison comparison = new Comparison();
String sourcePass = Utilities.sourcePassword;
String targetPass = Utilities.targetPassword;
InputStream result = comparison.compare(sourceFile, sourcePass, targetFile, targetPass, Utilities.outputFileName(".docx"), FileType.Docx);
System.out.println(result.available());