+ Reply to Thread
Results 1 to 3 of 3

Thread: What is the default value of float and double datatype in Java?

  1. #1

    What is the default value of float and double datatype in Java?

    Hi,

    What is the default value of float and double datatype in Java?


    Its my interview question anyone know the correct answer?

    anyone..

  2. #2
    Active Member sylvia is on a distinguished road
    Join Date
    Dec 2013
    Posts
    169
    In java the default value of float is 0.0f.
    and the default value of double is 0.0d.
    You make easily a program and check the default value of ant data type.

  3. #3
    If that question comes up, it's not about the default value; it's about giving you an opportunity to show your understanding of the difference between fields and local variables, writing clear code and how Java traps programming errors that are common in languages like C.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts