This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Unsigned right shift..

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is from http://WWW.JTIPS.net/Mock_Exam1.html
and the question number is 27.
True or False?
===============
Unsigned Right Shift on a Negative Integer always returns
a Positive Integer.
ans is given as false..
my answer is true.
what im missing? pls help and explain
regards.
Jaya murugan
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pre>
public class Test{
public static void main(String[] args)
{
int i = - 5;
i >>>=64;
System.out.println(i);
}
}
</pre>
Output is -5.
Cheers
SS


http://www.geocities.com/sahirshah/
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

Yeah It is False
What is the Answer for -1 >>> 0?
it is -1
Regards
Siva
 
Jaya Murugan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Shahi and Siva,
got it .
thanx
Jaya Murugan
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!