Question :Post-increment or Post-Decrement? Which would give better
performance?
e.g. for(int x=0; x < 10000; x++)
SOP("JG");
for(int y>0; y < 10000; y--)
SOP("JG");
(CoreJava)
Answer :Post-Decrement would give better performance. This is due to the binary
subtraction
(1's complement/ 2's complement)
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Thursday, March 12, 2009
Post-increment or Post-Decrement Which would give better
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment