You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
staticfinalStringdocument1 =
"albert einstein, was a german theoretical physicist who developed the theory of general relativity";
staticfinalStringdocument2 =
"near the beginning of his career, albert einstein thought that newtonian mechanics was no longer " +
"enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field";
staticfinalStringdocument3 =
"in late summer 1895, at the age of sixteen, albert einstein sat the entrance examinations for " +
"the swiss federal polytechnic in zurich";
publicstaticvoidmain(String[] args) {
LCSubstringSolversolver = newLCSubstringSolver(newDefaultCharSequenceNodeFactory());
solver.add(document1);
solver.add(document2);
solver.add(document3);
StringlongestCommonSubstring = CharSequences.toString(solver.getLongestCommonSubstring());
System.out.println(longestCommonSubstring);
}