Home > Back-end >  How to convert this type Double Integer types?
How to convert this type Double Integer types?

Time:09-19

Code and comments, thank you!

CodePudding user response:

Double b=2.2;
Int I=(int) b;
The Integer Count=Integer. The valueOf (I);

CodePudding user response:

reference 1st floor weixin_41502128 response:
double b=2.2;
Int I=(int) b;
The Integer Count=Integer. The valueOf (I);

Is not the basic data type Double Double wrapper classes

CodePudding user response:

reference 1st floor weixin_41502128 response:
double b=2.2;
Int I=(int) b;
The Integer Count=Integer. The valueOf (I);

I see the with the valueof at a time

CodePudding user response:

Return card can get 10 points available every day! Tip: you can also teach you how to faster available points enter 10000 characters

CodePudding user response:

Double a=new Double (" 2.2 ");
The Integer b=Integer. The valueOf (Anderson ntValue ());
System. The out. Println (b);

CodePudding user response:

(1) the double first converted to type int

 Double reseve3=Double. ParseDouble (bddet [0]. GetReserve3 ()); 

Int b=reseve3. IntValue ();


(2) put the int type is converted into an Integer type

 Integer rentCount=Integer. The valueOf (b); 

CodePudding user response:

 
Double d=1.23;
The Integer I=d.i ntValue ();

Why do you want to turn the past turned to the

CodePudding user response:

  • Related