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

Quiz

SDP-3

Aibat Karashev 43 questions

Take the quiz

Questions in this quiz (43)

  1. 1What will be the output of the program?<br>Image for question 1
    1. APine
    2. BOak
    3. CTree
    4. DForest
    5. EOops
  2. 2Select how you would run your program to cause it to print: Arg is 2 <br> Image for question 2
    1. Ajava Myfile 2 2 2
    2. Bjava Myfile 1 2 2 3 4
    3. Cjava Myfile 1 3 2 2
    4. Djava Myfile 1 2 2 2
    5. Ejava Myfile 0 1 2 3
  3. 3What is the prototype of the default constructor?<br> Image for question 3
    1. ATest()
    2. BTest
    3. Cpublic Test()
    4. Dpublic Test(void)
    5. ETest(void)
  4. 4What is the widest valid returnType for methodA in line 3?<br> Image for question 4
    1. Aint
    2. Blong
    3. Cbyte
    4. Ddouble
    5. Evoid
  5. 5Which is valid in a class that extends class A?<br> Image for question 5
    1. Apublic int method1(int a, int b) {return 0; }
    2. Bprivate int method1(int a, int b) {return 0; }
    3. Cprotected static int method1(int a, int b) {return 0; }
    4. Dpublic long method1(int a, int b) {return 0; }
    5. Epublic static int method1(int a, int b) {return 0; }
  6. 6What will be the output of the program?<br> Image for question 6
    1. Aone two three four
    2. Bone two three four one
    3. Cfour three two one
    4. Dfour one three two
  7. 7What will be the output of the program?<br> Image for question 7
    1. AAC
    2. BACD
    3. CBD
    4. DABCD
    5. EABD
  8. 8What will be the output of the program after the running program in such way :/> java Test red green blue?<br> Image for question 8
    1. Abaz =
    2. Bbaz = blue
    3. Cbaz = null
    4. DRuntime Exception
    5. ECompilation Error
  9. 9What will be the output of the program? <br> Image for question 9
    1. AIt will print the numbers from 0 to 19 sequentially
    2. BIt will print the numbers from 1 to 20 sequentially
    3. CIt will print the numbers from 0 to 19 but the order is not determined
    4. DIt will print the numbers from 1 to 20 but the order is not determined
    5. EIt will print the numbers from 0 to 9 two times, but the order is not determined
  10. 10The following block of code creates a Thread using a Runnable target: <br>
    Which of the following classes can be used to create the target, so that the preceding code compiles correctly?
    Image for question 10
    1. Apublic class MyRunnable extends Runnable{public void run(){}}
    2. Bpublic class MyRunnable extends Object{public void run(){}}
    3. Cpublic class MyRunnable implements Runnable{public void run(){}}
    4. Dpublic class MyRunnable implements Runnable{void run(){}}
    5. Epublic class MyRunnable implements Thread{void run(){}}

Information

Description
Quiz on SDP-3, created by Aibat Karashev on 17/01/2017.
Language
English
Views
433
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?