Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

0800 Integer number too large????

807597Oct 11 2005 — edited Oct 12 2005
the part of code is shown below:

			if(currentTime > 800 || currentTime <= 1200)
		{
			System.out.println("The current time: " + currentTime + "\nPart of Day: Morning");
		}
	
		if( currentTime  > 1200 || currentTime <= 1700)
		{
		System.out.println("The current time: " + currentTime + "\nPart of Day: Afternoon");
		}
	
		if( currentTime > 1700 || currentTime <= 2400 )
		{
		System.out.println("The current time: " + currentTime + "\nPart of Day: Evening");

		}

		if( currentTime > 0100|| currentTime <= 800)
		{

		System.out.println("The current time: " + currentTime + "\nPart of Day: Early morning");
		}
	}
and i get this error msg :


integer number too large: 0800
if(currentTime > 0800 || currentTime <= 1200)
^
integer number too large: 0800
if( currentTime > 0100|| currentTime <= 0800)
^

and i try to change the "0800" to "800", the problem is solved.... i would like to know why this happened???? can anyone help???

regards,

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 9 2005
Added on Oct 11 2005
10 comments
127 views