JAVA SP T


Lets dive into snapshot of my programs!💻

17.How to convert int to double.

💡Code:

public class IntToDoubleImplicitConversion7078 {
                public static void main(String[] args) {
                    // Example int
                    int intValue = 123;
            
                    // Convert int to double (implicit conversion)
                    double doubleValue = intValue;
            
                    // Print the converted double value
                    System.out.println("Converted double value: " + doubleValue);
                }
            }
            
           

📸Output :

output