This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes can we apply left hift and right shift operators to double,float??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can we apply left hift and right shift operators to double,float???" Watch "can we apply left hift and right shift operators to double,float???" New topic
Author

can we apply left hift and right shift operators to double,float???

Deepakk Verma
Ranch Hand

Joined: Sep 09, 2009
Posts: 31
Can we apply right shift(>>), and left shift (<<) operator to float and double type values?..
if not why?
Please explain...
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Why don't you write a small test program to find out if you can do that or not? Experimenting is a great way to learn.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
. . . Or read the Java™ Language Specification.
Deepakk Verma
Ranch Hand

Joined: Sep 09, 2009
Posts: 31

Thank you guys
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
You're welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we apply left hift and right shift operators to double,float???
 
Similar Threads
Shift operators
why this flaw in typecasting
Wrapper Float Constructor
Reg. >>
Can anyone tell the result of this code.