Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Java
Expertise: Beginner
Mar 27, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Be Careful When You Cast

Java allows you to cast variables, or change them from one variable type to another. However, it's important to make sure that the final variable type can store all the information from the original variable type, as Java will discard any additional information.

For example, if you cast a variable with a value of 20 from short to byte, you won't lose any information. However, if you make the same cast with an initial value of 20,000, you'll get an incorrect result because a byte variable's maximum value is 127.
Manoj K.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date