Skip to content

Commit 3c2752f

Browse files
author
Sarah Dwyer
committed
Updates: condense return statement
1 parent 3ee0fda commit 3c2752f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LongPressed.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public boolean isLongPressedName(String name, String typed) {
2525
if (i < name.length() && name.charAt(i) == typed.charAt(j)) { i++; }
2626
else if (i > 0 && typed.charAt(j) != name.charAt(i - 1)) { return false; }
2727
}
28-
return (i == name.length()) ? true : false;
28+
return i == name.length();
2929
}
3030

3131
public static void main(String[] args) {

0 commit comments

Comments
 (0)