You are not logged in. Lock_open    

Browse tutorials by Tag - loops

Confusing And and Or (BlueJ) Time: 5:24 Gb
Average:
  • Currently 3.0/5 Stars from 55 ratings
  •  
  •  
  •  
  •  
  •  
55 ratings
Your Rating:
  • Currently 0.0/5 Stars from 55 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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 Gb
Average:
  • Currently 3.2/5 Stars from 67 ratings
  •  
  •  
  •  
  •  
  •  
67 ratings
Your Rating:
  • Currently 0.0/5 Stars from 67 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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 Gb
Average:
  • Currently 3.2/5 Stars from 47 ratings
  •  
  •  
  •  
  •  
  •  
47 ratings
Your Rating:
  • Currently 0.0/5 Stars from 47 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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.