← servoy magazine

[Quiz] Binary fun

  • Quiz

[image unavailable: Picture_56] Keeping your 0's and 1's straight is important. Test your Servoy knowledge by taking the following quiz. It should be easy, the answer to each question is either zero or one!

Q1: The following objects start counting at...?

record index
foundset index
array
defined object
dataset (JSDataSet) row
dataset (JSDataSet) column
javascript month number
javascript day number
1st position of a string

Q2: The following expressions evaluate to...?

Math.ceil(.5)
Math.floor(.5)
Math.round(.5)
(72/3)/24
(72%3)/24
false + false
true - true
(!false) ? 1 : 0

Q3: What is the air-speed velocity of an unladen swallow?

Comments (2)

Tony
Great questions! Why is it in java that the first month of the year = 0 but the first day of any month is 1? ie var dmy = new Date("01/01/2008"); var month = dmy.getMonth(); // month is 0 var date = dmy.getDate(); // date is 1 I don't know the answer, the inconsistency's always puzzled me and I figured that someone who is so wise in the ways of unladen swallows might know the answer.
David Workman
What do you mean? African or European Java?