The method in question looks like:
Public static String cut (String s, int size){
Return "";
}
The method in question looks like:
Public static String cut (String s, int size){
Return "";
}
There is String.substring()
to cut off a string.
Example of how to use:
"hamburger".substring(4, 8) returns "urge"
"smiles".substring(1, 5) returns "mile"
In your case it would be:
"hamburger".substring(0, 4) returns "hamb"
Docs: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#substring(int,%20int)