↳
Consider a single threaded single processor environment. Do you still need a volatile? Less
↳
Volatile keyword is used during multi-threading when you want the threads to edit this variable value. It ensures that the value of the variable is not cached and is stored directly in the main memory. hence, enabling concurrent usage of the variable by different threads. Less
↳
-HTML5 for cross-compatibility across platforms. Use Phonegap, jQuery Mobile, Titanium, TideSDK as examples. -HTML5 if future web interface. -Mobile app if you will have features relying on system behaviour (ex, iOS iCloud, Android Play Store, etc.) -Mobile app if users need performance, or if they might be using it offline (but HTML5 offline is still an option) But we are now starting to see a hybrid of these two approaches (ex. http://www.orubase.com/ Orubase). It really depends on the requirements, and the ability of developers (cost estimates) to do this. Less
↳
Like best: - Scalable - Easy to understand for front-end developers because it's still javascript Like least: - Not bundled with other features included in other environment like Rails. You have to download modules, but why can't these be integrated from the beginning? - Lack of cross-compatibility in modern browsers (bad answer, since he was referring to server-side JS) Less
↳
/* Cool dude program */ import java.util.*; public class Main { public static void main (String[]args) { int i; for (i = 100; i <= 500; i++) { if (i % 55 == 0) { System.out.println ("Cool dude"); } else if (i % 5 == 0) { System.out.println ("Cool"); } else if (i % 11 == 0) { System.out.println ("Dude"); } else { System.out.println (i); } } } } Less
↳
long long a; scanf("%lld",&a); int b; scanf("%d",&b); printf("%lld",a+b); Less