The question is from one of the mock exam. For which ranges of values is the sin method defined? (Choose all that apply.) A. greater than or equal to 0.0 B. -PI / 2 through PI / 2 C. 0.0 through 360.0 I selected B but the ans given:B and C. Pl comment on this. -Sanjana
I could be wrong, but I seriously doubt that such a question would appear on the SCJP exam. Perhaps you may want to be aware that the trigonometry functions in the Math class take arguments in radians, not degrees. But that knowledge would mostly be useful when actually using one of these methods (when you should be able to take a quick look at the documentation to figure it out). I doubt that you'll need to know it for the exam. [ December 14, 2003: Message edited by: Dirk Schreckmann ]
I agree with Dirk that it's exceedingly unlikely that this question would be asked in the exam. If it were though, the correct answer would be D: any double can be passed as a legal parameter to this function. The values repeat themselves every 2π radians, so you usually just take the sin of an angle in the range 0 to 2π, or -π to π. Regardless, just ignore this question. It's not a good question, and not a good answer. The mock exam is simply wrong in this case. Which mock exam was it, anyway?