Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

int length=343 is 343 an integer literal or decimal literal???

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int length=343 is it decimal or integer literal

its given in the book as an decimal example ,if it is decimal then how cum it doesnot have a decimal point??
 
Rohit Aggarawal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Numeric value is same for both and that's why it is treated as the decimal literal.
 
Campbell Ritchie
Marshal
Posts: 53110
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means "decimal" as opposed to octal binary and hexadecimal.
It doesn't mean "decimal fraction".
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!