Recommended
PPTX
PPTX
PPTX
PPTX
Java-Typecasting-A-Deep-Dive-Exploration.pptx
PPTX
PPTX
PPTX
OOP - Lecture04 - Variables, DataTypes and TypeConversion.pptx
PPTX
Type casting in c programming
PPTX
pps presentation type casting.pptx
PPT
PPTX
LECTURE_2_JAVA_two.pptx - COM123 Object Oriented Programming with Java by Bil...
PPTX
PPTX
PPTX
PPTX
Chapter i(introduction to java)
PPTX
Java Porgamming Java Porgamming Java Porgamming Java Porgamming Java Porgammi...
PDF
Lecture 22B Data Types and Variables.pdf
PPTX
it is about to start basic syntax to begin with for the java beginners
PDF
Data Conversion and Type Casting Concepts
PDF
9.0 Typecasting in C Language inc language
PPTX
DOC-20250124-WA0004._20250430_233059_0000.pptx
PPTX
DOC-20250124-WA0004._20250430_233059_0000.pptx
PPTX
Type casting & type conversion
PPTX
01 Java Language And OOP PART I
PPTX
PDF
S05-Java.pdfzxggsxigxkgxlhcirsjfxkggisif
PPTX
PPTX
PPTX
Lubrication Neglect Causes More Downtime Than AI Ever Will Why Maintenance Fu...
PPTX
Distresses in Road Flexible pavement.pptx
More Related Content
PPTX
PPTX
PPTX
PPTX
Java-Typecasting-A-Deep-Dive-Exploration.pptx
PPTX
PPTX
PPTX
OOP - Lecture04 - Variables, DataTypes and TypeConversion.pptx
PPTX
Type casting in c programming
Similar to Type Casting in java programming language.pptx
PPTX
pps presentation type casting.pptx
PPT
PPTX
LECTURE_2_JAVA_two.pptx - COM123 Object Oriented Programming with Java by Bil...
PPTX
PPTX
PPTX
PPTX
Chapter i(introduction to java)
PPTX
Java Porgamming Java Porgamming Java Porgamming Java Porgamming Java Porgammi...
PDF
Lecture 22B Data Types and Variables.pdf
PPTX
it is about to start basic syntax to begin with for the java beginners
PDF
Data Conversion and Type Casting Concepts
PDF
9.0 Typecasting in C Language inc language
PPTX
DOC-20250124-WA0004._20250430_233059_0000.pptx
PPTX
DOC-20250124-WA0004._20250430_233059_0000.pptx
PPTX
Type casting & type conversion
PPTX
01 Java Language And OOP PART I
PPTX
PDF
S05-Java.pdfzxggsxigxkgxlhcirsjfxkggisif
PPTX
PPTX
Recently uploaded
PPTX
Lubrication Neglect Causes More Downtime Than AI Ever Will Why Maintenance Fu...
PPTX
Distresses in Road Flexible pavement.pptx
PDF
BOQ LESSON 2-QUANTITY TAKE-OFF & RATE BUILD-UP.pdf
PPTX
AI-Agents-Concepts-Applications-and-Types.pptx
PDF
comprehensive analysis of cross-chain bridges in the DeFi - Garima Singh
PDF
A Newbie’s Journey: Hidden MySQL Pain Points That Vitess Quietly Solves
PDF
Chemical Hazards at Workplace – Types, Properties & Exposure Routes, CORE-EHS
PPTX
Basic Volume Mass Relationship and unit weight as function of volumetric wate...
PDF
Python programming basics Unit-1 for R25 regulation
PPTX
We-Optimized-Everything-Except-Decision-Quality-Maintenance-MaintWiz.pptx
PDF
Code-Compliant As-Built BIM Deliverables for California Public and Government...
PDF
CME397 SURFACE ENGINEERING UNIT 1 FULL NOTES
PDF
Murdoca Arquictetura de computadoras 2026
PDF
CME397 SURFACE ENGINEERING UNIT 2 FULL NOTES
PDF
Basic Thumb rule For switchgear Selection
PPTX
Unit 3_statistical methods in data science.pptx
PDF
Computer Graphics Fundamentals (v0p1) - DannyJiang
PPTX
The #1 Reason Your MRO Budget Exploded — And How Predictive Maintenance Fixes It
PPTX
Optimized access control techniques in Cloud Computing with Security and Scal...
PPTX
ISO 13485.2016 Awareness's Training material
Type Casting in java programming language.pptx 1. 2. What is type casting?
Assigning a value of one type to a variable of another type is known
as Type Casting.
Example
Int x=10; byte y=(byte)x;
3. Type of Casting
There are Two types of type casting.
Implicit Casting(Widening/By Compiler)
Explicit Casting(Narrowing/By Programmer)
4. 5. Example of Implicit(widening)
public class Test
{
Public static void main(String args[])
{ int i=100;
long l=I; //no explicit type casting required
float f=I; //no explicit type casting required
System.out.println(“Int Value “+i);
System.out.println(“Long Value “+l);
System.out.println(“Int Value “+f);
}
}
OUTPUT
Int Value 100
Long Value 100
Float Value 100.0
6. 7. Example of Explicit(narrowing)
public class Test
{
public static void main(String args[])
{ double d=100.04;
long l=(long)d; //explicit type casting required
Int i=(int)I; //explicit type casting required
System.out.println(“Double Value “+d);
System.out.println(“Long Value “+l);
System.out.println(“Int Value “+i);
}
}
OUTPUT
Double Value 100.04
Long Value 100
Int Value 100
8.