R4R
Right Place For Right Person TM
 

Which one is a valid declaration of a boolean?

previous previous previous
Question:
Which one is a valid declaration of a boolean?

Which one is a valid declaration of a boolean?

Post Your Answers


User Name:
Answers:

Related Links

  1. What is the numerical range of a char?
  2. Which three are valid declarations of a float?
  3. Which three are legal array declarations?
  4. public class myprog { public static void main(String [] args) { int [] [] [] a = new int [3] [] []; int x,y; a[0] = new int[3][]; a[1] = new int[3][]; a[2] = new int[4][]; for (x=0; xGiven the following, public class myprog { public static void main(String [] args) { byte [][] big = new byte [8][8]; byte [][] x = new byte [3][2]; byte x3 = 6; byte x2 [][][][] = new byte [3][4][2][3]; .................................. } } which of the following lines of code could be inserted at dotted line , and still allow the code to compile?
  5. Which two will declare an array and initialize it with Ten numbers?
  6. Which will legally declare, construct, and initialize an array?
  7. Which four describe the correct default values for array elements of the types indicated?
  8. Given the following, public class myhorse { public static void main(String [] args) { Horse [][] theHorse = new Horse[3][]; System.out.println(theHorse[2][0].toString()); } } class Horse {} what is the result?
  9. Given the following, public class myprog { public static void main(String [] args) { String names [] = new String[10]; for (int i=0; i < args.length; i++) names[i] = args[i]; System.out.println(names[2]); } } and the command line invocation is java i a b what is the result?
  10. Given the following, public class CommandArgs { public static void main(String [] args) { String s1 = args[1]; String s2 = args[2]; String s3 = args[3]; String s4 = args[4]; System.out.print(" args[2] = " + s2); } } and the command-line invocation, java CommandArgs 1 2 3 4 , what is the result?
  11. Given the following, public class CommandArgsTwo { public static void main(String [] argh) { String [] args; int x; x = argh.length; for (int y = 1; y <= x; y++) { System.out.print(" " + argh[y]); } } } and the command-line invocation, java CommandArgsTwo 1 2 3
  12. Given the following, public class CommandArgsThree { public static void main(String [] args) { String [][] argCopy = new String[2][2]; int x; argCopy[0] = args; x = argCopy[0].length; for (int y = 0; y < x; y++) { System.out.print(" " + argCopy[0][y]); } } } and the command-line invocation, java CommandArgsThree 1 2 3 what is the result?

Question:Which one is a valid declaration of a boolean?

Back Home Next

Tutorials,Examples,Questions and Answer

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R