Feature/bael 5609 static method (#12370)

* BAEL-5609: init

* BAEL-5609: update examples

* BAEL-5609: refactor

* BAEL-5609: delete car example
This commit is contained in:
Daniel Strmecki
2022-07-04 20:11:58 +02:00
committed by GitHub
parent 56afb8bda9
commit 8824b85d1c
7 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package com.baeldung.staticmethods;
public final class CustomStringUtils {
private CustomStringUtils() {}
public static boolean isEmpty(CharSequence cs) { return cs == null || cs.length() == 0; }
}

View File

@@ -0,0 +1,15 @@
package com.baeldung.staticmethods;
public class StaticCounter {
private static int counter = 0;
public static int incrementCounter() {
return ++counter;
}
public static int getCounterValue() {
return counter;
}
}