Followup to this Q&A.
The aim is to match a String, which is returned by the following method:
public String getAssignment() {
return (String) hashmap.get("assignment");
}
Attempt
As the following:
String s = "12345";
System.out.println(s.matches("12345"));
results in a match, the idea was that:
System.out.println(assignment.getAssignment());
System.out.println(assignment.getAssignment().length());
System.out.println(assignment.getAssignment().matches("11111"));
System.out.println(assignment.getAssignment().equals("11111"));
System.out.println(assignment.getAssignment().trim().length());
should return true
as well.
Result
System.out 11111
System.out 15
System.out false
System.out false
System.out 13