if i have a string str that is: a>b
what is the best way to find if string str has a >
?do i use:
delimiter =">"
str.split(delimter)
or
str.contains(">")
or regular expression? actually i would prefer using regular expression, how to use regular expression in this case?
thanks for the help
It would be
System.out.println("a>b".matches(".*>.*"));
But in this case, I would just go with contains