GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 16 of 923    Print  
How does Java handle integer overflows and underflows
It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation.


  
Total Answers and Comments: 2 Last Update: April 05, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 10, 2006 04:51:37   #1  
ramu        

RE: How does Java handle integer overflows and underfl...
In java ,no overflow or underflow of integers happens i.e., the values wrap around.Adding 1 to the maximum int value results  in the minimum value
 
Is this answer useful? Yes | No
April 05, 2007 04:39:10   #2  
Sony V George        

RE: How does Java handle integer overflows and underfl...
In java there is no point of overflow and underflow, it was there in C. For avoiding that java introduces type casting.

Java will allow some more space from the defult space of primtive type.

 
Is this answer useful? Yes | No

 Related Questions

It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation. 
Latest Answer : In java there is no point of overflow and underflow, it was there in C. For avoiding that java introduces type casting. Java will allow some more space from the defult space of primtive type. ...

The EventObject class and the EventListener interface support event processing. 
Latest Answer : Java.util.Event class ...

A native method is a method that is implemented in a language other than Java. 
Latest Answer : Informs the compiler that the method has been used in a non-java platform and used only with the methods. ...

A task's priority is an integer value that identifies the relative order in which it should beexecuted with respect to other tasks. The scheduler attempts to schedule higher prioritytasks before lower 

The java.awt.AWTEvent class is the highest-level class in the AWT event-classhierarchy. 

Most of the AWT-related events of the event-delegation model are defined in thejava.awt.event package. The AWTEvent class is defined in the java.awt package. 

The purpose of the Runtime class is to provide access to the Java runtime system. 
Latest Answer : Which returns the runtime information like memory availablilityRuntime.freeMemory() --> Returns JVM Free MemoryRuntime.maxMemory() --> Returns the maximum amount of memory that the JVM will attempt to use.also helps to run the garbage collectorRuntime.gc() ...

The = operator is right associative. 
Latest Answer : Prefix Unary operatorsObject creation and castTernaryAssignment ...

A Java source code file takes the name of a public class or interface that is defined withinthe file. A source code file may contain at most one public class or interface. If a publicclass or interface 

The fractional part of the result is truncated. This is known as rounding toward zero. 


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

Convert a String into an Integer

How to convert a string into an integer in C program? This is done by using the function named as atoi(). This function atoi() is present in the header file named as <stdlib.h>. When programmers use this function they must include the header file by the statement #include <stdl
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape