140 likes | 228 Views
IT'S TIME TO PLAY. ROUND 1. Name a method associated with class String. length(). 1.). 34. indexOf(). 2.). 26. compareTo(). 15. 3.). charAt(). 4.). 11. substring(). 5.). 7. toUpper(). 3. 6.). ROUND 1. Name a method associated with class Math. max(). 1.). 25. min(). 2.).
E N D
Name a method associated with class String length() 1.) 34 indexOf() 2.) 26 compareTo() 15 3.) charAt() 4.) 11 substring() 5.) 7 toUpper() 3 6.)
Name a method associated with class Math max() 1.) 25 min() 2.) 23 random() 18 3.) sqrt() 4.) 12 pow() 5.) 4 round() 3 6.)
Name a punctuation (syntax) symbol used in Java parenthesis (for methods) 1.) 74 braces (for structures) 2.) 52 semicolon (end lines) 30 3.) quotation marks (strings) 4.) 18 dot/period (objects) 5.) 14 comma (separate parameters) 8 6.)
Name a rule for naming variables No spaces 1.) 86 Case sensitive 2.) 62 Can’t begin with a number 36 3.) No special characters 4.) 10
Method divides a number by 2 until the answer is less than 1, then returns the number of divisions int count2Div(int num) { 1.) 93 int count = 0; 2.) 9 while (num >= 1) { 75 3.) num = num/2; 4.) 78 count++; } 5.) 21 return count; } 24 6.)