java pgme for class members hours:minutes:seconds then the
constructor expects milliseconds as assignment and initialize
data members the members function print hh:mm:ss 90,000
milliseconds passed in constructor then the output is 00:01:30
Answer / Ruby Kumari Saha
Here's a simple Java code snippet demonstrating this behavior:nn```javanpublic class Time { n private long timeInMilliseconds;nn public Time(long timeInMilliseconds) {n this.timeInMilliseconds = timeInMilliseconds;n }nn public void members() {n int hours = (int) (timeInMilliseconds / (1000 * 60 * 60));n int minutes = (int) ((timeInMilliseconds % (1000 * 60 * 60)) / (1000 * 60));n int seconds = (int) ((timeInMilliseconds % (1000 * 60 * 60)) % (1000 * 60)) / 1000;n System.out.printf("%d:%02d:%02d", hours, minutes, seconds);n }n}nnpublic class Main {n public static void main(String[] args) {n Time time = new Time(90000);ntime.members();n }n}```
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you create a new object in JavaScript?
Which is faster jquery or javascript?
what is difference between client side scripting and server side scripting?
Which company developed JavaScript?
How do I open javascript in browser?
How do I find javascript?
How can javascript be used to improve the "look and feel" of a web site? By the same token, how can javascript be used to improve the user interface?
Are there any predefined constant provided by the browser with the key code values that can be reused?
How to reload a page using JavaScript?
When selecting the states by giving the country as input using ajax cal, how can we ensure that every time it is hitting the DB and fetching the data? Many time it may load from the cache.
Is javascript backend or frontend?
What is escape & unescape String functions in JavaScript?