Results 1 to 6 of 6
- 10-11-2008, 03:08 AM #1
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
Need help with calculate the number of seconds
I'm really new to java program and i need help with my homework assignment. I have no idea where to start it. Please help me out here is the question...
1) Write a Java program to calculate the number of seconds that have passed since the stroke of midnight in London on New Years Eve, 1970. Your program should not be long, just a few lines of code. (Hint - don’t try and calculate the result yourself, browse through the Java API and find some help there…)
hxxp://java.sun.com/j2se/1.4.2/docs/api/index.html
- 10-11-2008, 03:13 AM #2
Senior Member
- Join Date
- Sep 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
Hint: Look at the System class.
- 10-11-2008, 03:39 AM #3
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
is it public static long currentTimeMillis()? how do i use it...
- 10-11-2008, 03:49 AM #4
Senior Member
- Join Date
- Sep 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
Have you read the API? If so, it should be pretty clear.
- 10-11-2008, 03:56 AM #5
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
I'm reading it right now... the problem is i have never used API. I don't know how to use it...
- 10-11-2008, 04:07 AM #6
Senior Member
- Join Date
- Sep 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
Similar Threads
-
calculate fft
By ram.west in forum Advanced JavaReplies: 2Last Post: 08-27-2008, 04:05 AM -
Transaction has timed out due to no client activity for greater than {1} seconds
By Sayed in forum Advanced JavaReplies: 1Last Post: 06-30-2008, 08:14 AM -
How to use Timer class to schedule a task to execute once 5 seconds have passed
By Java Tip in forum java.utilReplies: 0Last Post: 06-26-2008, 08:32 PM -
measuring time in nano seconds
By Java Tip in forum Java TipReplies: 0Last Post: 11-06-2007, 01:11 PM -
Calculate what e1 and e2 should be
By Legoland in forum New To JavaReplies: 11Last Post: 07-02-2007, 07:01 PM
Bookmarks