Java Type Conversion with Aditya Tandon Sir

Day 5 of Learning Java : Today I started my journey into Java programming which is taught by Aditya Tandon Sir. Here are the key concepts I learned today: Type Conversation In Java:- In Java, "type conversion" is the process of changing a value from one data type to another. 1. Implicit Type Conversation • This happens automatically when we pass a value from a smaller primitive datatype to a larger primitive datatype. Because we are moving to a "bigger container," there is no risk of losing data. ∆ The Hierarchy: byte → short → char → int → long → float → double 2. Explicit Type Conversation • This must be done manually by placing the type in parentheses ( ) in front of the value. This is used when moving from a larger type to a smaller type. • It can loss the data. (e.g., losing decimals or overflowing). ∆ The Hierarchy: double → float → long → int → char → short → byte This is just the beginning. Excited to continue this journey Special thanks to Rohit Negi ne bhaiya & Aditya Tandon Sir. #Day5 #Java #Coding #Learning #Consistency

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories