Question: What will be the output of the given code snippet? ( type casting ) public static void main ( String args [ ] ) {

What will be the output of the given code snippet? (type casting)
public static void main(String args[])
{
int i =10;
float f =30.89f;
double d =100.25;
f =(float) i;
d =(double) f;
i =(int) d;
System.out.println("i ="+ i);
System.out.println("f ="+ f);
System.out.println("d ="+ d);
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!