Week 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

X

arpitgupta9907@gmail.com 
abhisheklodhi2842004

(https://swayam.gov.in)

(https://swayam.gov.in/nc_details/NPTEL)

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Programming In Java (course)

If already
registered, click
to check your
Week 04 : Assignment 04
payment status The due date for submitting this assignment has passed.
Due on 2024-02-21, 23:59 IST.
As per our records you have not submitted this assignment.

Course outline 1) Which is the keyword used to specify the default access modifier in java? 1 point

a. default
About NPTEL
() b. DEFAULT
c. package
How does an d. “There is no keyword”
NPTEL online
course work? No, the answer is incorrect.
Score: 0
()
Accepted Answers:
d. “There is no keyword”
Week 0 : ()

2) What is the output of the Java program with access modifiers? 1 point
Week 1 : ()

Week 2 : ()

Week 3 : ()

Week 4 : ()

Lecture 16 :
Demonstration-
VII (unit?
unit=42&lesson=
43)

Lecture 17 :
Packages-I
(unit?
unit=42&lesson= a. FOUR
44) b. Runtime Error
c. null
Lecture 18 : d. Compiler Error
Packages-II
No, the answer is incorrect.
(unit?
Score: 0
unit=42&lesson=
Accepted Answers:
45)
d. Compiler Error
Lecture 19 :
3) What is the output of the below Java Code Snippet with access modifiers? 1 point
Demonstration-
VIII (unit?
unit=42&lesson=
46)

Lecture 20 :
Interface-I (unit?
unit=42&lesson=
47)

Quiz: Week 04 :
Assignment 04
(assessment?
name=297)

Assignment 4
Solution (unit?
unit=42&lesson=
49) a. Weeks = 0

Feedback For
b. Weeks = 12
Week 4 (unit? c. No Error, blank output
unit=42&lesson=
d. Compiler error
48)
No, the answer is incorrect.
Week 5 : () Score: 0
Accepted Answers:
b. Weeks = 12
Week 6 : ()

Week 7 : () 4) Which of the following is the correct representation of access modifiers in order of increasing1 point
visibility?
Week 8 : ()
a. private < default < protected < public
b. private < protected < default < public
Week 9 : ()
c. public < protected < default < private
Week 10 : () d. protected < default < private < public
No, the answer is incorrect.
Week 11 : () Score: 0
Accepted Answers:
Week 12 : () a. private < default < protected < public

DOWNLOAD 5) Which of the following package stores all the standard java classes? 1 point
VIDEOS ()
a. java.util
Books () b. java.lang
c. java.java
Text
d. java.packages
Transcripts ()
No, the answer is incorrect.
Score: 0
Problem
Accepted Answers:
Solving
b. java.lang
Session - Jan
2024 ()
6) Which of the following is/are true about packages in Java? 1 point
1. Every class is part of some package.
2. All classes in a file are part of the same package.

3. If no package is specified, the classes in the file go into a special unnamed package.
4. If no package is specified, a new package is created with folder name of class and the class is
put in this package.

a. Only 1, 2 and 3
b. Only 1, 2 and 4
c. Only 4
d. Only 1 and 3

No, the answer is incorrect.


Score: 0
Accepted Answers:
a. Only 1, 2 and 3

7) What is the output of following Java program? 1 point

a. Compiler Error
b. Runtime Error
c. Welcome!
d. None of the above

No, the answer is incorrect.


Score: 0
Accepted Answers:
c. Welcome!

8) Which of these access specifiers can be used for an interface? 1 point

a. Public
b. Protected
c. private
d. All of the mentioned

No, the answer is incorrect.


Score: 0
Accepted Answers:
a. Public

9) Which of the following is the correct way of implementing an interface salary by class 0 points
manager?

a. class Java extends NPTEL {}


b. class Java implements NPTEL {}
c. class Java imports NPTEL {}
d. none of the mentioned
No, the answer is incorrect.
Score: 0
Accepted Answers:
b. class Java implements NPTEL {}

10) What will be the output of the following Java program? 0 points

a. 0
b. 2
c. 4
d. Compiler Error

No, the answer is incorrect.


Score: 0
Accepted Answers:
c. 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy