aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Math Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Math" Watch "Math" New topic
Author

Math

sanjana narayanan
Ranch Hand

Joined: Nov 25, 2003
Posts: 142
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

Joined: Dec 10, 2001
Posts: 7023
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 ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
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?


"I'm not back." - Bill Harding, Twister
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8764
    
    5
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.


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Math
 
Similar Threads
confusion on (==)
-0.0 == 0.0 ? help
double question in srinivas majji's mock exam
Majji #Q.28
Math functions