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 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 ?
Which of the following means that in order for the conditional to happen, either x must be less than 3 or y must be greater than or equal to 4 ?
What is essential in making sure that your loop is not infinite ?
Which is NOT a section of all types of loops ?
In a ‘for’ loop, what section of the loop is not included in the parentheses after “for” ?
What is a function in terms of Computer Science ?
What is the difference between private and public functions ?
What does AWT stands for ?
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?
Given: class Titanic { public static void main(String[] args) { Boolean bl = true; boolean b2 = false; boolean b3 = true; if((bl & b2) | (b2 & b3) & b3) System.out.print("alpha "); if((bl = false) | (b1 & b3) | (bl | b2)) System.out.print("beta "}; } } What is the result?