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

Quiz

SDP#3

хомяк убийца 164 questions

Take the quiz

Questions in this quiz (164)

  1. 13. [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
  2. 24. Given the declaration of an array : int[] a = {1,2,3,4,5}; What is the value of a[4]?
    1. Ao 2
    2. B3
    3. C4
    4. D5
    5. E1
  3. 35. An array holds:
    1. ASimilar values of same data type
    2. BDifferent values of same data type
    3. CSame values of different data types
    4. DDifferent values of different data types
  4. 46. [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. AA copy of the array rats
    2. BThe value of the elements of rats
    3. CA reference of the array
    4. D1.2
    5. E2.3
  5. 59. 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. Ajava.util.Map
    2. Bjava.util.Set
    3. Cjava.util.Tree
    4. Djava.util.List
    5. Ejava.util.Collection
  6. 610. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?
    1. Apublic
    2. Bprivate
    3. Cprotected
    4. Dtransient
    5. Evolatile
  7. 711. Let’s assume that you have class C and interface I ? Which of the following is correct statement?
    1. Aclass C implements I
    2. Bclass C extends I
    3. Cinterface I extends C
    4. Dinterface I implements C
    5. Eclass I implements C
  8. 815. Given a method in a class, what access modifier do you use to restrict access to that method to only the other members of the same class?
    1. Afinal
    2. Bpublic
    3. Cprivate
    4. Dprotected
    5. Estatic
    6. Fvolatile
  9. 916. [html] Which three statements are true? <br> 1. The default constructor initialises method variables.<br> 2. The default constructor has the same access as its class.<br> 3. The default constructor invokes the no-arg constructor of the superclass.<br> 4. If a class lacks a no-arg constructor, the compiler always creates a default constructor. <br> 5. The compiler creates a default constructor only when there are no other constructors for the class.
    1. A1,2,4
    2. B2,3,5
    3. C3,4,5
    4. D1,2,3
    5. E1,3,5
  10. 1019. Which is a valid declaration within an interface?
    1. Apublic static final short stop = 23;
    2. Bprotected short stop = 23;
    3. Ctransient short stop = 23;
    4. Dfinal void madness(short stop);
    5. Evoid madness(short stop) = 0;

Information

Description
Quiz on SDP#3, created by хомяк убийца on 18/01/2017.
Language
English
Views
25
Tags
god
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?