Java – Double Example

Double is primitive data type in java which can take long decimal value. Use of double in java is shown below.

Example of Double

public class DoubleExampleJava {

    public static void main(String[] args) {
        double db=3456.12345;

        System.out.println("double data primitive type :"+db);
    }
}

Output

double data primitive type :3456.12345

Tags:

Bookmark  

 

Leave a Reply

Security Code:

 

  Random Post