Answers for "how to convert decimal to int java"

1

how to convert int to integer in java

// new Integer(i) is deprecated in java
//therefore you can use the below mentioned technique
int iInt = 10;
Integer iInteger = Integer.valueOf(iInt);
Posted by: Guest on July-03-2021
1

how to convert a number into a decimal number in java

public class StringNumberToDecimal {

	public static void main(String[] args) {
		String string = "10";
		float decimalValue = Float.parseFloat(string);
		System.out.println(decimalValue);

	}
}
Posted by: Guest on December-15-2021

Code answers related to "how to convert decimal to int java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language