What is Type Casting In Java | What is Data Loss | Implicit and Explicit Type Casting | Class#12
Must Watch and Understand Your Next 3 Months Journey Blueprint:
https://www.youtube.com/watch?v=3X8MHTU8DKA
Download your Java Programming Finisher Blueprint Document - Free ONLY for Limited Periods Only:
https://docs.google.com/spreadsheets/d/1ofhGDLDAFW0GmCepqnCs8JtcgV-J3s-x/edit?usp=drive_link&ouid=113583350930199567253&rtpof=true&sd=true
# # # # # # # # # # # # # # # # # # # # # # # # # ##
What is Type Casting In Java | What is Data Loss | Implicit and Explicit Type Casting | Class#12
Thanks for watching, if this video add any value to you then please don't forget to like, share and Subscribe my channel.
1. Do you want to Learn JAVA only to Pass Exam or You want to learn How to use it like a Software Professional in real Project ?
2. Do you need to learn the Smart Tricks from Your 1st Day Coding Journey, that I have used in my last 15 Years IT Experience ?
3. Do you need to understand the MISTAKE a Student do from the 1st Day of Coding?
4. Do you only need an Instructor or a Experienced Mentor, who will guide you what will be your next steps after learning JAVA ?
Hi, this is Arun Kumar Hazra, having 15 years of IT experience in multiple MNC Companies with multiple projects in different languages. I am here not only to teach you about Java but also give your the tips and tricks that I earn from my 15 years of experience - like what to do ? what not to do ? what will be your next step ?
So, don't wait and grab this opportunity as soon as possible. I am happy to reply you on my WhatsApp 8276057236.
Details:
What is Type Casting ?
The process of converting one Data Type to another Data Type is called Type Casting.
Why need ?
There are some situation come in your programming logic where you need to store value of one type into a variable of other type.
What is different Type of Casting in Java ?
1. Implicit Type Casting
2. Explicit Type Casting
What is Implicit Type Casting ?
Converting Lower Type (eg. int) to Higher Type (eg. double) is automatically converted by Compiler and here as a developer you don't have to write any casting logic. This type of conversion is call Implicit Type Casting.
What is Explicit Type Casting ?
Converting Higher Type (eg. double) to Lower Type (eg. int) is not automatically converted by Compiler and here as a developer you have to write some casting logic. This type of conversion is call Explicit Type Casting. Here there can be possibility of Data Loss.
Program:
public class TypeCastingDemo {
public static void main(String[] args) {
// Implicit
int a = 66;
double d = a;
System.out.println(a);
System.out.println(d);
// Explicit
double d1 = 65.67;
int a1 = (int)d1;
System.out.println(d1);
System.out.println(a1);
}
}
Output:
66
66.0
65.67
65
Assignment:
Please crate a same Program as above and do some R&D with different Types like byte, short, int, long, float, double.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «What is Type Casting In Java | What is Data Loss | Implicit and Explicit Type Casting | Class#12», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.