aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes integer/integeral type????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "integer/integeral type?????" Watch "integer/integeral type?????" New topic
Author

integer/integeral type?????

Janet Yap
Greenhorn

Joined: Mar 13, 2004
Posts: 24
According to Marcus Green exam ::3
Q no -24
Which of the following statements are true??.
1) The following statements will produce a result 1.
System.out.println(-1 >>> 2);
2)Performing and unsigned leftshift (<<<) on negative number will always produce negative number result.

3)The following output will produce a result of zero,
System.out.printlln(1>>1);
4) All integer premitive in java are signed numbers.

The answer given is only 3. I aggred that 3 is right but why not 4 ???.
If incase of integer if they mentioned integral then its ok, but integer primitive are byte,short,int,long.
Please correct me if i'm wrong ???
Thanx

sp.
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi sp,
char is included in integer primitive. & it is signed .so option 4) is wrong.
regards
deekasha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: integer/integeral type?????
 
Similar Threads
Doubt in Marcus mock exam 3
Integral types -- MG Exam 3 Q 25
Q from examulator.com
true/false
From marcus green