• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Math

 
sanjana narayanan
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bert Bates
author
Sheriff
Posts: 8900
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My two cents:
To just further what Jim said, if you understand that the trig methods work in radians, and how to convert in and out of radians, you'll be set for this exam topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic