Answer the question
In order to leave comments, you need to log in
How to return a value from a java method?
Good day! Studying java stumbled on banality, how to get the value of s?
public String[] delSpace(String[] mas) {
// String[] s;
for (final String seq : mas) {
String[] s = getDelSpace(seq);
}
return s;
}
Answer the question
In order to leave comments, you need to log in
This is how what you want to do should look like.
public String[] delSpace(String[] mas) {
String[] s = new String[mas.length];
for(int i = 0; i < mas.length; i++){
s[i] = getDelSpase(mas[i]);
}
return s;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question