gudii9
asked on
conditional code and condition difference
Hi,
i am looking at below example
http://www.tutorialspoint.com/java/java_continue_statement.htm
I am not clear on difference between conditional code and condition as given in diagram there with respect to below code
i am thinking codition is if( x == 30 )
not sure what is conditional code again??
please advise
i am looking at below example
http://www.tutorialspoint.com/java/java_continue_statement.htm
I am not clear on difference between conditional code and condition as given in diagram there with respect to below code
ublic class Test {
public static void main(String args[]) {
int [] numbers = {10, 20, 30, 40, 50};
for(int x : numbers ) {
if( x == 30 ) {
continue;
}
System.out.print( x );
System.out.print("\n");
}
}
}
This would produce the following result:
10
20
40
50
i am thinking codition is if( x == 30 )
not sure what is conditional code again??
please advise
not sure what is conditional code again??
Conditional code would just be a block of code that may or may not be executed, based on the result of the condition.
ASKER
Conditional code would just be a block of code that may or may not be executed, based on the result of the condition.
in this example what it is?
what is the meaning of that flow diagram if it has any meaning to it?
How they can take a simple idea and convolute it is beyond my understanding. That flowchart really sucks.
I agree. It doesn't show anything useful. It would be best to send feedback to the authors of that flowchart.
The site u are referencing is a rubbish site.
Dont use this again.
Dont use this again.
I recommend deleting this question and ask again after finding a better site to learn from.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
in this example what it is?
In the above minimal example, line 8 (the line that just says "continue") is an example of conditional code. That line IS executed if x == 30 but it is NOT executed otherwise.
i see your point.
usually diamond check box in diagram drawn at top. here drawn at bottom to add confusion. i got it now
http://www.tutorialspoint.com/java/
How they can take a simple idea and convolute it is beyond my understanding. That flowchart really sucks.