NPTEL Programming in Java Week 8 Assignment Answers 2024

Sanket
By Sanket

NPTEL Programming in Java Week 8 Assignment Answers 2024

1. What does AWT stand for in Java?

a. Applet Windowing Toolkit
b. Abstract Window Toolkit
c. Absolute Windowing Toolkit
d. Amazing Window Toolkit

Answer :- For Answers Click Here 

2. In Java, what is the purpose of a Card Layout?

a. To create a card game interface
b. To arrange components in a card-like fashion
c. To manage multiple panels within a single container
d. To display images of cards

Answer :- For Answers Click Here 

3. Which layout manager divides the container into five regions: North, South, East, West, and Center?

a. Border Layout
b. Grid Layout
c. Flow Layout
d. Card Layout

Answer :- For Answers Click Here 

4. In Java, what is the primary purpose of a layout manager?

a. To manage memory allocation
b. To arrange GUI components within a container
c. To handle exception handling
d. To control database connections

Answer :- 

5. What will be the output of the Java code given below?

image 65

a. Compilation error
b. An empty frame with no button
c. A frame with a button “Programming in Java – 2024” at coordinates (30, 50)
d. A frame with a button, but not at the specified coordinates

Answer :- 

6. Which layout manager arranges components in a top-to-bottom flow, adding them to the next available position?

a. Grid Layout
b. Flow Layout
c. Border Layout
d. Card Layout

Answer :- For Answers Click Here 

7. What is the significance of AWT components being heavyweight?

a. They have higher memory requirements
b. They are slower in performance
c. They are dependent on the underlying operating system
d. They are easier to customize

Answer :- 

8. Which AWT concept allows you to handle events such as button clicks or mouse movements?

a. Event Handling
b. Function Overloading
c. Mouse Manager
d. GUI Processing

Answer :- 

9. Which layout manager organizes components in a grid, with each cell of the grid containing a component?

a. Flow Layout
b. Grid Layout
c. Border Layout
d. Card Layout

Answer :- 

10. What is the layout manager used in the Java code given below?

image 66

a. Grid Layout
b. Border Layout
c. Flow Layout
d. Card Layout

Answer :- For Answers Click Here 
Share This Article
Leave a comment