Solved

Calendar.HOUR_OF_DAY at midnight

Posted on 2013-11-29
2
357 Views
Last Modified: 2013-11-29
hi experts

I have this code using java 7:

Calendar cal = Calendar.getInstance() ;
int hours = cal.get(Calendar.HOUR_OF_DAY) ;

Open in new window


If the program is running at 12 AM , will hours be 23, 24 or 00 ?

thx
0
Comment
Question by:royjayd
2 Comments
 
LVL 27

Accepted Solution

by:
dpearson earned 300 total points
ID: 39685667
Midnight is 0

Doug
0
 

Author Closing Comment

by:royjayd
ID: 39685769
thanks, any help with this question will be greatly appreciated
http://www.experts-exchange.com/Programming/Languages/Java/Q_28306670.html
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 86
java imports not found 4 51
Html Table Looping (part 2) 5 35
Find out all repos that a user is most active on Github 1 32
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question