programming languages Online Quiz - 207
Description: programming languages Online Quiz - 207 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
What's the difference between an Applet and an application ?
What is the main function of any variable ?
What is the proper way to declare a variable ?
The following statements make “length” be what number ? int length; length = 4; length ++;
What is an assignment statement ?
What will be the value of “num” after the following statements? int num; num = (5+4); num = num / 9; num = 12;
If you want your conditional to depend on two conditions BOTH being true, what is the proper notation to put between the two Boolean statements ?
Given: class Hexy { public static void main(String[] args) { Integer i = 42; String s = (i<40)?"life":(i>50)?"universe":"everything"; System.out.println(s); } } What is the result?
class Fork { public static void main(String[] args) { if(args.length == 1 | args[1] .equals("test")) { System.out.println ("test case"); } else { System.out.println("production " + args[0]); } }}And the command-line invocation:java Fork live2What is the result?
Given: class Foozit { public static void main(String[] args) { Integer x = 0; Integer y = 0; for(Short z = 0; z < 5; z++) if((++x > 2) || (++y > 2)) X++ ; System.out.println(x + " " + y); } } What is the result?