CyberCodes

Reminders sa mga rehistradong myembro:

•ang lengwahe na gagamitin ay pawang english at tagalog lamang

•Bawal po dito ang pakikipag away

•Bawal ang mga shorcut na mga words
Example: txt, Pwd, at iba pa

•Bawal mababastos at masasakit na salita o anu mang makakasakit
ng damdamin ng isang myembro ng forum na ito

•use the "like" button if the post of the following user you think are usefull


Java ternary Operator

Go down

Admin Post Java ternary Operator

Post by princeterror on Sat Sep 22, 2012 4:51 am

Example

Code:
int num = 0;
If (value < 100)
{
  num = value;
}
else
{
  num = 1000;
}


Can be achieved as:

int num = (value < 100) ? value : 1000;
avatar
princeterror
Universal Moderator
Universal Moderator

Posts : 272
Credits : 11465
Fame : 81
Join date : 2012-06-07
Age : 27

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum