What is widening and narrowing conversion in Java ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What is widening and narrowing conversion in Java ?Core Java
Ans. Conversion means that the expression / literal / value of one type getting converted to other type.

Widening conversion is the conversion from Type A to Type B where B requires a wider space than A. For example - int to long, float to double, char to String etc. As the value moves to a wider space, there is no loss of information.

Narrowing conversion is the conversion from Type A to Type B where B requires a narrower space space than A. For example - int to long, float to double, char to String etc.As the value moves to a narrower space, there is a loss of information.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     data type  widening conversion  narrowing conversion


Related Questions

  What is casting?
  What are the Wrapper classes available for primitive types ?
  What are wrapper classes ?
 Why Java is not considered pure OOP's language ?
  What is Generalization and Specialization in terms of casting ?
  Which data types are supported by JSON ?
  What are the default or implicitly assigned values for data types in java ?
  What is the difference between float and double?
 How do you prefer to store money values in your application ?
  Difference between long.Class and Long.TYPE ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: