Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: About data type

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post About data type

    Hi, every one. I am a new user of this forum and Java.
    My question is which format is correct or difference.

    long a = 10000L;
    float b = 20000F;
    double c = 3000000D;

    or,

    long a = 10000;
    float b = 20000;
    double c = 3000000;


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,386
    Thanks
    49
    Thanked 2,208 Times in 2,181 Posts

    Default Re: About data type

    Take a look at the tutorial: Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics)
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Data storage question - which type would be best?
    By mmazur in forum Java Theory & Questions
    Replies: 5
    Last Post: August 25th, 2012, 09:57 AM
  2. My first rpg with a custom data type
    By Kylelem62 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 13th, 2012, 08:28 AM
  3. Replies: 2
    Last Post: February 17th, 2012, 01:13 AM
  4. Primitive data type
    By stuart harper in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 17th, 2011, 12:14 PM
  5. About heap data type
    By PaddyWangTheGG in forum Algorithms & Recursion
    Replies: 2
    Last Post: May 17th, 2010, 03:02 PM

Tags for this Thread