Is there a method in Java where you can get a sub-string from a string? Like for example, I have a:
string_a = "B1 B2 B4 B3"
Is there a way to check if the string_b = "B3"
exists in the string_a
? I'm doing a program where string_a
can change its value but string_b
is constant. I need to check if string_a
has a string_b
.
string_A.contains(string_b)