diff --git a/Java/lab_3/lab_3.java b/Java/lab_3/lab_3.java index 394e4e5..7a5ab2a 100644 --- a/Java/lab_3/lab_3.java +++ b/Java/lab_3/lab_3.java @@ -13,8 +13,8 @@ public class lab_3 { leftBoundary--; rightBoundary++; } - // if it's length is greater than maxLength update - // maxLength and res + // if it's length is greater than maxStrLength update + // maxLength and result if (rightBoundary - leftBoundary - 1 >= maxStrLength) { result = string.substring(leftBoundary + 1, rightBoundary); maxStrLength = rightBoundary - leftBoundary - 1;