• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Question

 
Arsho, Ayan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<code>
byte b = 128 //gives error
byte b = -128 //okay
why does byte b = -100000978787830 not give any error since the range is -128 tp 127?
thanks

</code>
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what compiler you have, but mine complains !!
byte b = 128; // Possible loss of precision
byte b = -100000978787830; // integer number too large

------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Arsho, Ayan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use this IDE calle Itellij Idea from www.intellij.com
I recommend u to use it, it is the best IDE i have across so far.
Try it
Thanks
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not an IDE guy, but thanks. I like to be in control of my code and environment A lot of IDE out there are just not smart enough or want to be too smart in my opinion...
The proof is your question
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
[This message has been edited by Valentin Crettaz (edited November 17, 2001).]
 
Arsho, Ayan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I knew you'd come back to my question but anyways ...
That IDE is Excellent
thanks
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK I'll try it, but I surely won't buy it (400 bucks sounds like too much to my ears
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
[This message has been edited by Valentin Crettaz (edited November 17, 2001).]
 
Arsho, Ayan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Val :

If u especially work in large projects tasks running checkstyle, indenting code, code completion ... are built in.
thanks for looking into that
Later

[This message has been edited by Arsho, Ayan (edited November 17, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic