This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: incompatible data types, and will raise a compile-time error. 2 (2 point) Write a series of statements that creates a variable of the Beeper type, assigns to it a new Beeper object, then sends the object the message beep with the single argument 5. Writing a line of that created the object was worth one point; writing a line that called the beep method was worth another point. The following answer would have received both points: Beeper beeperVariable = new Beeper(); beeperVariable.beep(5); 3 (2 point) On the following chart, mark where Javas type-handling system belongs. 1 6-Dynamic Static Weak Strong x Java is a staticly-typed language because the type of every variable is declared and known at the time of compilation. It is a strongly-typed language because data types cannot be automatically converted to other types (e.g. the string to double conversion in Question 1). Correct placement on each axis was worth one point. 2...
View Full Document