• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

primitives question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After many searches I keep coming up with mixed answers.

What are the integral types in Java?
byte,short,int,char

What are the numeric types in Java?
byte,short,int,long,char,float,double

Why is long left out of the integral type or did I read bad info?
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you're reading older material, the long may not have been invented yet. Of course, you'd have to go a long way back to that time.

The integral types, that is, the ones that can be treated as whole numbers are byte, short, int, long and char.

The numeric types that can have decimals are the double and the float.

So, that pretty much covers it. long is definitely in there!
 
Michael Jackson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:Well, if you're reading older material, the long may not have been invented yet. Of course, you'd have to go a long way back to that time.

The integral types, that is, the ones that can be treated as whole numbers are byte, short, int, long and char.

The numeric types that can have decimals are the double and the float.

So, that pretty much covers it. long is definitely in there!



Thanks Cameron I knew it made since to be in there but different places omitted it.

BTW I've really enjoyed your SCJA cert guide, my test is tomorrow afternoon just doing some last minute cramming!
 
reply
    Bookmark Topic Watch Topic
  • New Topic