aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Math method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Math method" Watch "Math method" New topic
Author

Math method

zarina mohammad
Ranch Hand

Joined: Jun 26, 2002
Posts: 104
the code below is from Dan's mock

the output is supposed to be 2.0. but i'm getting NoClassDefFoundError Exception at runtime. can someone help know what is happening?
thanks
zarina
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Try import "java.util.*;" up front.
-Barry
No that's not correct. It compiles without the import.
Ho Hum...
Have you got it in a file called Remaindercls.java?
[ August 14, 2002: Message edited by: Barry Gaunt ]
[ August 14, 2002: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
zarina mohammad
Ranch Hand

Joined: Jun 26, 2002
Posts: 104
The method belongs to Math class in java.lang package.so there is no need to import java.util package.
Binu K Idicula
Ranch Hand

Joined: Jul 11, 2002
Posts: 99
Check whether any other library class is available.
All other programs working ???
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Gives me 2.0.
Is it Remaindercls, or RemainderCls, or RemainderClass? I make that sort of misteak all the time.
-Barry
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hey Binu, we don't need a forum, we need chat for this!
zarina mohammad
Ranch Hand

Joined: Jun 26, 2002
Posts: 104
thanks barry its works now..i saved the file as Remindercls instead of Remaindercls.
i also wanted to know....is this method IEEEremainder() new to java?....i didn't find it in RH&E book.
zarina
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Dunno, to tell the truth I'm rather scared to look.
Could be that Dan's gearing up for 1.4.
No that method is not new. But maybe for 1.4 we will have to dig a little deeper into these things.

Dan?
-Barry
[ August 14, 2002: Message edited by: Barry Gaunt ]
[ August 14, 2002: Message edited by: Barry Gaunt ]
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Originally posted by Barry Gaunt:

Could be that Dan's gearing up for 1.4.
No that method is not new. But maybe for 1.4 we will have to dig a little deeper into these things.
Dan?
-Barry

Barry,
The Math.IEEEremainder method has been around at least since Java 1.1. However, I took a look at the objectives for the exam the other day and noticed that it isn't in the objectives. That would explain why it isn't in the study guides.
I took the IEEEremainder methods out of the xml source code files for the exam. The next version that I put up on the web site won't have them.
I also added some questions for the trigonometry methods. Previously, I didn't put those in because I didn't think it was fair to assume that everyone that studies Java has also studied trigonometry.
I also added a question or two on the random method. Previously, I didn't include the random method in the exam because it is difficult to write a code example that produces a predictable result using Math.random.
The above updates will be included in the next version of the exam that I will put up some time this week.


Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
janus place
Greenhorn

Joined: Aug 14, 2002
Posts: 8
Dan,
I am not able to get to your mock exam website.

Janus place
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Originally posted by janus place:
Dan,
I am not able to get to your mock exam website.

Janus place

Janus,
I just clicked on both links in my signature and they both worked. Please try again and let me know what happens.
suresh kamsa
Ranch Hand

Joined: Jul 30, 2001
Posts: 149
I am not able to get in to Dan mock exams site.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Works fine from here - Switzerland
janus place
Greenhorn

Joined: Aug 14, 2002
Posts: 8
Links don't work from here, USA !
-Janus
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
There's nothing wrong with the link. I'm in the USA and can use it just fine.


Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Janus and Suresh,
Are you still having trouble with the links or are they working now?
The site is hosted by Yahoo Geocities. Back when the site still had those popup ads it was limited to 3 GB of data transfers each month and Yahoo would limit access to the site if they felt that the data transfer rate was being exceeded. Since upgrading to Geocities Pro for $8.95 a month the data transfer limit has been increased to 10 GB per month. Since the upgrade, I have not received any messages from Geocities about exceeding the limit. For that reason, I assume that Geocities has not intentionally limited access.
If you are still having a problem with access, then please post another message so that we can try to determine what is going on.
Has anyone else had a problem accessing the URL contained in my signature?
If you are having a problem with the new URL
http://www.danchisholm.net/
then please try the old URL
http://www.geocities.com/danchisholm2000/
If one URL works but not the other, then please let me know.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Siill (www.danchisholm.net) works from here, Switzerland.
Went down a few levels, no problems. (Got out PDQ though, so as to avoid answering those exam questions, Phew!
janus place
Greenhorn

Joined: Aug 14, 2002
Posts: 8
Dan,
Both these links are still not working for me.
Thanks,
Janus
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Janus,
Who is your Internet Service Provider? I wonder if there is a problem with your ISP or their DNS server.
Can you find the geocities home page from your machine?
http://geocities.yahoo.com/
If you can't find that page, then your ISP must be having a real problem.
If you can find the geocities home page, then type "Java Mock Exam" into the search box. One of the results should be Sun Certified Java Programmer Mock Exam by danchisholm2000.
Please let us know if that works.
janus place
Greenhorn

Joined: Aug 14, 2002
Posts: 8
Well, I can get to geocities webpage and see the link in search results. But when I click the link, I get an error message that the server could be down... blah...
Thanks,
-Janus
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Originally posted by janus place:
Well, I can get to geocities webpage and see the link in search results. But when I click the link, I get an error message that the server could be down... blah...
Thanks,
-Janus

Janus,
I sent an email to geocities to see if they have any idea what is happening. I hope that you will do the same with your Internet Service Provider.
Are you behind a firewall? If so, then it is possible that your firewall blocks access to some sites including mine.
janus place
Greenhorn

Joined: Aug 14, 2002
Posts: 8
Bulls-eye !
I tried to connect using a different ISP and was able to get to your website. The firewall was preventing me from loggin on to your website. Phew !! Thanks Dan for walking me through. Next I'll jump right into mock exams.
Thanks again,
-Janus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Math method