Solved

Calendar.HOUR_OF_DAY at midnight

Posted on 2013-11-29
2
370 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 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

728 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