Programming in Java Nptel Week 10 Assignment Answers

Are you looking for Programming in Java Nptel Week 10 Assignment Answers? You’ve come to the right place! Access the latest and most accurate solutions for your Week 10 assignment in the Programming in Java course



Programming in Java Nptel Week 10 Assignment Answers (Jan-Apr 2025)

Course Link: Click Here


1. Which Swing component is used to create a button?

a) JLabel
b) JButton
c) JTextField
d) JPanel

View Answer


2. What does a toggle button in Java do?

a) It switches between two states, like on/off or enabled/disabled.
b) It only changes the color of the button when clicked.
c) It displays text inside the button.
d) It opens a new window when clicked.

View Answer


3. What is the primary purpose of SQL (Structured Query Language) in a Java application?

a) To create and manage user interfaces
b) To interact with databases for data retrieval and manipulation
c) To perform system-level tasks like file management
d) To handle memory allocation in Java programs

View Answer


4. Which method is used in Java to check if a network interface is up and running?

a) isActive()
b) isUp()
c) isRunning()
d) isConnected()

View Answer


5. Which of the following are considered basic networking components in Java?

a) Socket and ServerSocket
b) String and Integer
c) JFrame and JButton
d) Scanner and System

View Answer


6. In the context of the following URL, identify the correct option:

URL: https://nptel.ac.in

a) There is no protocol provided in the above link.
b) The website provides a secure connection.
c) The given link is incomplete and hence cannot open a website.
d) The ac.in refers to the domain.

View Answer


7. Which of the following is/are application layer protocol(s)?

a) TCP
b) UDP
c) ARP
d) SMTP

View Answer


8. What does this Java code snippet do?

a) Connects to a MySQL database, retrieves data from the “employees” table, and prints it
b) Inserts data into the “employees” table of a MySQL database
c) Deletes data from the “employees” table of a MySQL database
d) Updates data in the “employees” table of a MySQL database

View Answer


9. Which class provides methods to work with URLs?

a) URLConnection
b) HttpURL
c) NetURL
d) URL

View Answer


10. Which class in Java is used to create a server socket?

a) Socket
b) ServerSocket
c) DatagramSocket
d) HttpURLConnection

View Answer


These are NPTEL Programming in Java Nptel Week 10 Assignment Answers

More Weeks of Programming In Java: Click here

More Nptel Courses: https://progiez.com/nptel-assignment-answers

Programming in Java Nptel Week 10 Assignment Answers