Solved

casting and autoboxing differences and similarities in java

Posted on 2014-11-12
2
433 Views
Last Modified: 2014-11-14
hi,

I would like to know "casting and autoboxing differences and similarities in java". When to use which one with practical examples. Thanks in advance.
0
Comment
Question by:gudii9
2 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
Comment Utility
Casting is when you convert an object type to another object type. For example you convert an "Integer" to a "Number".

Autoboxing is when you convert a primitive to an object. For example you convert an "int" to an "Integer".
0
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 250 total points
Comment Utility
Boxing is when you convert a primitive type to a reference type,
(only between primitive type and wraaper classes )



Casting is when you want one type to be treated as another type (its may be a your own class _)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now