refactor: ReverseString, test improvements (#5406)

* refactor: ReverseString

* refactor: refactor testing into two methods

* checkstyle: fix formatting

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
This commit is contained in:
Alex Klymenko
2024-08-27 13:00:11 +02:00
committed by GitHub
parent e3ad3761fd
commit 49d1c84cb7
2 changed files with 17 additions and 25 deletions

View File

@ -7,11 +7,6 @@ public final class ReverseString {
private ReverseString() {
}
public static void main(String[] args) {
assert reverse("abc123").equals("321cba");
assert reverse2("abc123").equals("321cba");
}
/**
* easiest way to reverses the string str and returns it
*