GoConqr has a new look! Let us know what you think.

Quiz

Untitled

Ai Ka 12 questions Updated 15 Jan 2017

Take the quiz

Questions in this quiz (12)

  1. 12. Select how you would run your program to cause it to print: Arg is 2 <br> Image for question 1
    1. Ao java Myfile 2 2 2
    2. Bo java Myfile 1 2 2 3 4
    3. Co java Myfile 1 3 2 2
    4. Do java MyFile 1 2 2 2
    5. Eo java Myfile 0 1 2 3
  2. 21. What will be the output of the program?<br>Image for question 2
    1. Ao Pine
    2. Bo Oak
    3. Co Tree
    4. Do Forest
    5. Eo Oops
  3. 33. [html]What does the following code do? <br>void blur(char[] z, String st) {<br> if(z.length < st.length()) retrun; <br> for(int i = 0; i < st.length(); i++) <br> z[i] = st.charAt(i); <br>}
    1. Ao It determines if the array contains the same characters as the String
    2. Bo It copies characters from the array to the String
    3. Co It copies characters from the String to the array;
    4. Do It creates a new array that contains the same characters as the String
  4. 44. Given the declaration of an array : int[] a = {1,2,3,4,5}; What is the value of a[4]?
    1. A2
    2. B3
    3. C4
    4. D5
    5. E1
  5. 55. An array holds:
    1. Ao Similar values of same data type
    2. Bo Different values of same data type
    3. Co Same values of different data types
    4. Do Different values of different data types
  6. 6[html]Java uses call by value. What is the value that is being passed into the routine by the method call in the following? <br> double rats[] = {1.2 , 2.3, 3.4}; <br> routine(rats);
    1. Ao A copy of the array rats
    2. Bo The value of the elements of rats
    3. Co A reference of the array
    4. Do 1.2
    5. Eo 2.3
  7. 77. What is the prototype of the default constructor?<br> Image for question 7
    1. Ao Test()
    2. Bo public Test()
    3. Co public Test(void)
    4. Do Test(void)
  8. 8
    8. What is the widest valid returnType for methodA in line 3?<br>
    Image for question 8
    1. Ao int
    2. Bo long
    3. Co byte
    4. Do double
    5. Eo void
  9. 99. You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that capability?
    1. Ao java.util.Map
    2. Bo java.util.Set
    3. Co java.util.Tree
    4. Do java.util.List
    5. Eo java.util.Collection
  10. 1011. Let’s assume that you have class C and interface I ? Which of the following is correct statement?
    1. Ao class C implements I
    2. Bo class C extends I
    3. Co interface I extends C
    4. Do interface I implements C
    5. Eo class I implements C

Information

Description
Quiz on Untitled, created by Ai Ka on 14/01/2017.
Author
Ai Ka
Language
English
Views
0
History
Created on 14 Jan 2017 · updated on 15 Jan 2017
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?