more-java-quizes

Swamped with your writing assignments? We'll take the academic weight off your shoulders. We complete all our papers from scratch. You can get a plagiarism report upon request just to confirm.


Order a Similar Paper Order a Different Paper

Which three are legal array declarations?

  1. int [] myScores [];
  2. char [] myChars;
  3. int [6] myScores;
  4. Dog myDogs [];
  5. Dog myDogs [7];
A. 1, 2, 4
B. 2, 4, 5
C. 2, 3, 4
D. All are correct.


7.
public interface Foo _x000D_
{ _x000D_
    int k = 4; /* Line 3 */_x000D_
}_x000D_

Which three piece of codes are equivalent to line 3?

  1. final int k = 4;
  2. public int k = 4;
  3. static int k = 4;
  4. abstract int k = 4;
  5. volatile int k = 4;
  6. protected int k = 4;
A. 1, 2 and 3
B. 2, 3 and 4
C. 3, 4 and 5
D. 4, 5 and 6


8.

Which one of the following will declare an array and initialize it with five numbers?

A. Array a = new Array(5);
B. int [] a = {23,22,21,20,19};
C. int a [] = new int[5];
D. int [5] array;


9.

Which three are valid declarations of a char?

  1. char c1 = 064770;
  2. char c2 = ‘face’;
  3. char c3 = 0xbeef;
  4. char c4 = u0022;
  5. char c5 = ‘iface’;
  6. char c6 = ‘uface’;
A. 1, 2, 4
B. 1, 3, 6
C. 3, 5
D. 5 only


10.

Which is the valid declarations within an interface definition?

A. public double methoda();
B. public final double methoda();
C. static void methoda(double d1);
D. protected void methoda(double d1);
Writerbay.net

We offer CUSTOM-WRITTEN, CONFIDENTIAL, ORIGINAL, and PRIVATE writing services. Kindly click on the ORDER NOW button to receive an A++ paper from our masters- and PhD writers.

Get a 10% discount on your order using the following coupon code SAVE10


Order a Similar Paper Order a Different Paper