Answer the question
In order to leave comments, you need to log in
For each element in the array...?
There is a combination with a loop:
Translated as "Repeat for each element in the orange array".
There is in another method , where Number- int is a variable, I get it in another method using
Next, I would like to do "For each element in the array, we perform a post-increment operator on the variable z"
I get this:
but an error occurs with
The first question: how to create it correctly cycle in this case?
The second question: what is the name of this cycle in the scientific language: ?
PS: in the debug logs the values are:for( int y: orange)
args.putInt(S_NUMBER, Number);
getArguments().getInt(S_NUMBER)
for(int c : getArguments().getInt(S_NUMBER))
';' expected
for( : массив)
getArguments().getInt(S_NUMBER)
getArguments().getInt(S_NUMBER): 1
getArguments().getInt(S_NUMBER): 2
Answer the question
In order to leave comments, you need to log in
First, install some development environment for yourself, idea or eclipse or netbeans.
Secondly, the cycle must be of the Collection or Iterable types. Accordingly
for(Object obj : getArguments()) {
int с = (MyArgumentType)obj.getInt(S_NUMBER));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question