ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

For(int i = 0; ; i > 0){} will this code compile?

user-image
تم إضافة السؤال من قبل himanshu mittal
تاريخ النشر: 2013/06/27
Javed Khan
من قبل Javed Khan , Senior Programmer Analyst , Barclays Technology

Yes it will compile...but when you run you may get OOM exception.

Can't compile..
Because the for loop syntax is For(definitions; conditions; increment/decrement)

himanshu mittal
من قبل himanshu mittal

obviously it will compile.....by default the condition is true and @ place of increment/decrement u can do anything...

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟