Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 07-29-2016, 11:14 PM   #1
Shivangi Panwar
Registered User
 
Join Date: Nov 2015
Posts: 127
What is Typecasting ?

What is Typecasting ?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Shivangi Panwar is offline   Reply With Quote

Old 08-02-2016, 12:48 AM   #2
Kiara
Registered User
 
Join Date: Jun 2016
Location: USA
Posts: 55
The process of converting one data type to another is called Casting. It is used when a function returns a data of type in a different form then we need to perform an operation.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kiara is offline   Reply With Quote
Old 08-02-2016, 12:51 AM   #3
MuhammadSufyan
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 66
Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a 'long' value into a simple integer then you can type cast 'long' to 'int'. You can convert the values from one type to another explicitly using the cast operator as follows
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
MuhammadSufyan is offline   Reply With Quote
Old 08-03-2016, 03:00 AM   #4
Aashi
Registered User
 
Join Date: May 2016
Location: Ahmedabad, Gujarat
Posts: 14
Type casting is a process of converting one type to another. You can convert the values from one type to another explicitly using the cast operator.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Aashi is offline   Reply With Quote
Old 08-29-2016, 02:41 AM   #5
addisoncave
Registered User
 
Join Date: Jun 2016
Posts: 169
The process of changing data of one datatype in to different datatype is known as type casting. in some cases we need to change to int variable to float when we've to add it with a float variable to get a float variable. The Compiler automatically type cast the variable when something like this happen in Java.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
addisoncave is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:53 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.