35. Events and Listeners
public class DoIt
implements MouseLeftClickListener {
…
programWindow.addMouseLeftClickListener (this);
public void onLeftMouseClick(int x, int y) {
//Do something when clicked
}
}
38. Do…While Loops
do {
//Do something at least once
//Continue to do it while true
}
while (x < 20)
39. Unit Tests
@Test
public void testReturnsFizz( ) {
String result = FizzBuzz.convert(3);
//Verify expected vs. actual
assertEquals(“fizz”, result);
}
41. Java Keywords 1
Scope and Packages
• public
• private
• protected
• import
• package
Class and Methods
• abstract
• class
• new
• super
• static
• this
42. Java Keywords 2
Flow and Exceptions
• break
• do
• if
• else
• return
• while
• assert
• try, catch, finally
• throw, throws
Types
• boolean
• byte
• char, string
• enum
• int, double, float
• long, short
43. Java RegexMeta Characters
RegEx More Info
d Any Digits 0-9
D Not digits 0-9
s Whitespace
S Any Character
w Any word
W Not word
b End of word
B Not end of word
Editor's Notes
Image from -- http://3.bp.blogspot.com/-3YtmXVav-Zw/UL4w3cwhLVI/AAAAAAAAAGI/3svxMuEibQY/s1600/mvc_decoupling_3.PNG
From http://www.rexegg.com/regex-quickstart.html and http://www.javacodegeeks.com/2012/11/java-regular-expression-tutorial-with-examples.html