Question

Java Homework Question What is Primitive Casting in Java programming language? Explanation MUST be at LEAST...

Java Homework Question

What is Primitive Casting in Java programming language?

Explanation MUST be at LEAST a paragraph long. Post Programming Examples.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Primitive Casting means converting one primitive type of data to other primitive type data.

There are 2 types of primitive type casting
1. Widening
2. Narrowing

Example:
------------
1. Widening: conversion from a primitive that is simpler or smaller than the destination type
float f = 123.45778;
double d = f;


2. Narrowing: conversion from a primitive that is larger than the destination type
double d = 123456.789;
float f = (float) d;

Add a comment
Know the answer?
Add Answer to:
Java Homework Question What is Primitive Casting in Java programming language? Explanation MUST be at LEAST...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT