NPTEL(14 Sep - 04 Dec ) | Week 2 : Quiz Assignment 2 Programming in JAVA Solutions 2020.

 



        Programming in JAVA.       





Assignment 2:

1. What is the output of the following program?
a. 14
b. 13
c. 15
d. 11
Ans: a)14

2. During constructor overloading, which of the following should be used in a parameterized constructor to call the default constructor?
Ans: b)The this() reference should be used as the first statement inside the parameterized constructor.

3. Following is a program given for this question.

 What will be the output of the above program?
a. javanptel
b. npteljava
c. janjavanptel
d. janjavanp

Ans: a

4. Which of the following can be used to take input from user during the execution of a program?
Ans: c

5. Which of the following is/are TRUE about print() and println() methods?
Ans: b

6. Which of the following is called when a method having the same name as that the name of the class where it is defined?
Ans: c

7. Which of the following is a valid declaration of an object of class, say Box?
Ans: a

8. Following is a program given for this question.
What will be the output of the above program?
Ans: a)false

9. What will happen during the execution of the following code for the command line input?
Ans: a/c   (Not Confirm)

10. What is the output of the following program?
Ans: a)60
FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

No comments:

Post a Comment

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages