PROGRAMMING IN JAVA Assignment 8 | NPTEL

Computer Bits Daily
5 min readAug 22, 2024

--

PROGRAMMING IN JAVA Assignment 8 | NPTEL | Answer with Explanation |Java Applets and Servlets MCQs

https://www.computerbitsdaily.com/2024/08/java-applets-and-servlets-mcqs.html

Test Your Java Fundamentals with a Challenging MCQ Assignment on “ Java Applets and Servlets IN jAVA “ Sharpen your core Java skills with this engaging multiple-choice quiz (MCQ). Designed for beginners, this Assignment 8 assesses your understanding of Java Applets and Servlets Java concepts. Whether you’re new to programming or refreshing your knowledge, this MCQ [ Java Applets and Servlets ] challenge is a perfect way to gauge your progress and identify areas for improvement.

Learn Java Programming for free with Computer Course — CompEduBox Android app. Share with your Friends

QUESTION 1: Which of the following is NOT a class of java.awt package?

a. Color
b. Composite
c. Container
d. CursorView Answer

QUESTION 2: Which of the following is/are NOT an exception of java.awt package?

a. HeadlessException
b. AWTException
c. FontFormatException
d. IllegalStateExceptionView Answer

QUESTION 3: Which of the following method is/are of class button in java.awt package?

a. getLabel()
b. setLabel(String label)
c. getCurrent()
d. getItem(int index)View Answer

Correct Answer: a, b

Detailed Solution: setLabel(String label) method Changes this button’s label to be the String argument, and getLabel() method returns the current label of the button.

QUESTION 4: Which of the following is TRUE about the following GUI?

b. There is a Frame with two Labels and two non-editable TextFields.
c. There are two Labels.
d. There is a Frame with two Labels and two TextFields.View Answer

QUESTION 5: Which of the following is TRUE regarding check box and radio button?

a. Check box is used for single selection item whereas radio button is used for multiple selection.
b. Check box is used for multiple selection items whereas radio button is used for single selection.
c. Both are used for multiple as well as single item selection.
d. Checkbox is always preferred than radio buttons.View Answer

QUESTION 6: Which of the following is TRUE about check box in Java?

a. A check box can be in either an “on” (true) or “off” (false) state.
b. Clicking on a check box changes its state from “on” to “off” or from “off” to “on.”
c. A check box can be in an “on” (true) and in “off” (false) state simultaneously.
d. Check boxes cannot be grouped together.View Answer

QUESTION 7: Which of the following method is used to remove all items from scrolling list in java.awt.list?

a. hide()
b. remove()
c. clear()
d. close()View Answer

QUESTION 8: Which of the following statement is FALSE about the update() in java.awt package?

a. Sets the color of the graphics context to be the foreground color of this component.
b. Calls this component’s paint method to completely redraw this component.
c. Updates the component by checking an online repository.
d. Clears this component by filling it with the background color.View Answer

QUESTION 9: Which of the following is the latest graphics and media package for Java?

a. Applet
b. AWT
c. Swing
d. JavaFXView Answer

QUESTION 10: If setText(String text) is a method of Label class then why it is called non editable?

a. Because user-input is unavailable during runtime.
b. A Label is just a TextField with non-editable property turned on.
c. Labels are editable by default.
d. setText(String text) is not a method of Label class.View Answer

PYQ | The Joy of Computing using Python — Course | NPTEL

Learn Java Programming for free with Computer Course — CompEduBox Android app. Share with your Friends

Tags:

InheritancejavaJava Applets and ServletsJava Applets and Servlets MCQ Javajava nptel assignmentJava Programming

Posted by: PRG

You may like these posts

Popular Posts

Run Python Program on android with termux

January 27, 2023

Termux Secret — 11 Cool Commands Tricks You Didn’t Know Existed

January 03, 2024

Termux commands to Find Your Public IP Address : Demystifying the Digital You ️‍♀️

March 01, 2024

Labels

Search This Blog

Install Android app

Computer Fundamental, TechTerm, MCQ — Computer Bits

Subscribe Us

Amazon Associate Disclosure

Some of the links are affiliate links. This means that, at zero cost to you, I will receive little compensation if you click through the link and finalize a purchase. Shop @ Amazon

Facebook

Categories

Tags

Popular Posts

Run Python Program on android with termux

January 27, 2023

Termux Secret — 11 Cool Commands Tricks You Didn’t Know Existed

January 03, 2024

Termux commands to Find Your Public IP Address : Demystifying the Digital You ️‍♀️

March 01, 2024

Blogging

--

--

Computer Bits Daily

Learning Computer skills and Computer technology by learning and sharing