Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

double number java

class doubleNumber{
	public static voidmain (String []args){
    int x = 40; // can be used to store whole numbers except decimals//
    double y= 40.4; // can be used to store all numbers including decimals//
    System.out.println(y/2);// will print out the result 20.2//
    System.out.println(x/2); // will print out 2//
    }
}
    
Comment

PREVIOUS NEXT
Code Example
Java :: insert in arraylist 
Java :: android bottomnav fab 
Java :: How to change integers into float in java 
Java :: how to change fragment on button click navigation drawer 
Java :: long java 
Java :: What would be the behavior if this() and super() used in a method? 
Java :: lambda function java 
Java :: how to multiply a number by itself using for loop in java 
Java :: generate objects with for loop java 
Java :: change element in array java 
Java :: binary search algorithm java 
Java :: access array elements java 
Java :: java printwriter create file 
Java :: @restcontroller 
Java :: constructor of class that extends another class 
Java :: java creating an arraylist 
Java :: Java Enum compareTo() 
Java :: the java_home environment variable is not defined correctly on mac 
Java :: new date api in java 8 
Java :: Exception handling using try...catch 
Java :: array methods in java 
Java :: properties object using a file 
Java :: java meeting scheduler 
Java :: Java try...finally block 
Java :: random class in java 
Java :: java transformar string a url 
Java :: Java Using of() Method 
Java :: param vishisht seva medal 
Java :: What is the use of @Listener annotation in TestNG? 
Java :: jframe centerlaized 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =