Browse tutorials by Tag - loops
Confusing And and Or (BlueJ)
Time: 5:24
|
|
| Average: 55 ratings | Your Rating: |
| Categories: Conditional Loop Logic Error BlueJ | |
| Description: click for more...
This video shows the incorrect uses of || (or) in a compound boolean expression to control a validation loop. The incorrect boolean expression matches with commonly used English “if the user doesn’t answer ‘yes’ or the user doesn’t answer ‘no’ then make them type in another answer.” This expression is complicated by the fact that the “not” is used in conjunction with .equals is harder to parse than, for example, !=. |
|
Incompatible Types (Command Line)
Time: 1:33
|
|
| Average: 67 ratings | Your Rating: |
| Categories: Conditional Compile Error Loop Command Line | |
| Description: click for more...
What to do when you see an incompatible types compiler error in a loop condition or in the condition of an if statement. Shows the effect of using equals (=) instead of equalsequals (==), causing an assignment when you intend to have a equality comparison. |
|
String Index Out of Bounds (Command Line)
Time: 3:05
|
|
| Average: 47 ratings | Your Rating: |
| Categories: Runtime Error Logic Error Command Line | |
| Description: click for more...
Shows a program that is counting the number of words in a Java String. The program gets a stack trace that shows a java.lang.StringIndexOutOfBoundsException. The program is run using a Unix command line and a text editor. Demonstrates how to read a stack trace. |
|