?
Solved

Calendar.HOUR_OF_DAY at midnight

Posted on 2013-11-29
2
Medium Priority
?
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 1200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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