Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

#8 Type Conversion in Java

Автор: Telusko

Загружено: 2023-01-16

Просмотров: 524766

Описание:

Check out our courses:

Industry-Ready Java Spring Boot, React & Gen AI -Live: https://go.telusko.com/industry-ready...
Coupon: TELUSKO10 (10% Discount)

AI-Powered DevOps with AWS- Live V3: https://go.telusko.com/ai-powered-dev...
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/

Java Spring:- https://go.telusko.com/Udemyjavaspring
Java:- https://go.telusko.com/udemyteluskojava
Spring: https://go.telusko.com/udemyteluskosp...
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
WhatsApp : https://go.telusko.com/whatsapp
TELUSKO Android App : https://go.telusko.com/TELUSKOAPP
TELUSKO IOS App : https://apple.co/3SsgmU2
Discord :   / discord  

In this lecture we are discussing:
1)What is type conversion or type casting ?
2)Different ways to casting?
a)implicit type casting or automatic type casting
b)explicit type casting
3)What is effect of implicit and explicit type casting?
a) Narrowing conversion
4)Type promotion when we do operation

#1
What is type conversion or type casting ?
-- type conversion or type casting is the process of converting a value from one data type to another data type.
e.g int num=5; long l=num;

#2
Different ways to casting
a) Implicit type casting :-
It is way to in which compiler automatically convert smaller size data type in larger.
e.g int num=4; long l=num; //now num value converted to long

b) Explicit type casting :-
manually when programmer cast one data type into other is known as explicit type casting.
e.g float fl=4.5f; int num=fl; -- num value become 4;

syntax for conversion:
type1 x=value; //higher size
type2 y=(datatype of type2)x;

#3
What is effect of type casting ?
-- one effect is narrowing conversion
i.e Narrowing conversions can be done from a larger data type to a smaller data type, but they can result in loss of precision or data.
e.g float fl=5.6f; int num=fl; loss of 0.6 precision now value of num is 5.

Note: if you want convert
-- you get error . e.g int i=5; byte b=i; //give error
--in most cases conversion of higher datatype to lower data type give error
1. incompatible types: possible lossy conversion from long to byte
2. incompatible types: possible lossy conversion from double to int
3. incompatible types: possible lossy conversion from float to int
4. incompatible types: possible lossy conversion from double to byte
5. incompatible types: possible lossy conversion from float to byte
6. incompatible types: possible lossy conversion from double to short
7. incompatible types: possible lossy conversion from float to short
8. incompatible types: possible lossy conversion from double to long
9. incompatible types: possible lossy conversion from float to long
10. incompatible types: possible lossy conversion from double to char
-- these are some cases

#4
Type promotion :-
when we do arithmetic operation on two different data types, java will promote the smaller data type to the larger data type
int / int = int
int / float = float
int * float = float
short * short = int
short * int = int
short * long = long
byte * byte = int

System.out.println(5.2/3);
byte b=120; byte c=120;
System.out.println(a*b); //14400

Github repo : https://github.com/navinreddy20/Javac...


More Learning :

Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6

JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq

Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA

Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB

NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L

Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu

Donation:
PayPal Id : navinreddy20
https://www.telusko.com

#8 Type Conversion in Java

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

#9 Arithmetic Operators in Java

#9 Arithmetic Operators in Java

#40 Encapsulation in Java

#40 Encapsulation in Java

#10 Relational Operators in Java

#10 Relational Operators in Java

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

ESP32: распознавание речи нейросетью (TensorFlow Lite)

ESP32: распознавание речи нейросетью (TensorFlow Lite)

Я уменьшился до размеров чипа M5.

Я уменьшился до размеров чипа M5.

Мирные огоньки 2026: специальная версия концерта! ✨Монеточка, Макаревич, АлоэВера, Noize MC, Би-2

Мирные огоньки 2026: специальная версия концерта! ✨Монеточка, Макаревич, АлоэВера, Noize MC, Би-2

Java Tutorial For beginners

Java Tutorial For beginners

Шульман: точка невозврата пройдена? | Интервью про 2025-й год: Пугачева, Кадыров, Наки, Дзюба, ПАСЕ

Шульман: точка невозврата пройдена? | Интервью про 2025-й год: Пугачева, Кадыров, Наки, Дзюба, ПАСЕ

ООП На Простых Примерах | Объектно-Ориентированное Программирование

ООП На Простых Примерах | Объектно-Ориентированное Программирование

#26 Stack And Heap in Java

#26 Stack And Heap in Java

Как финский гик ВЫНЕС Майкрософт и стал богом айти // Линус Торвальдс

Как финский гик ВЫНЕС Майкрософт и стал богом айти // Линус Торвальдс

#6 Data types in Java

#6 Data types in Java

Sting - Every Breath You Take || Sylwester z Dwójką 2025

Sting - Every Breath You Take || Sylwester z Dwójką 2025

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

#11 Логические операторы в Java

#11 Логические операторы в Java

Java Tutorials || Java OOPS  || 3 Mantras of Object Type Casting || by durga sir

Java Tutorials || Java OOPS || 3 Mantras of Object Type Casting || by durga sir

Строки Java неизменяемы — вот что это на самом деле означает

Строки Java неизменяемы — вот что это на самом деле означает

#12 If else in Java

#12 If else in Java

Изучите Java за 14 минут (серьезно)

Изучите Java за 14 минут (серьезно)

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]