0% found this document useful (0 votes)
3 views13 pages

Question Java

The document outlines a comprehensive Java programming curriculum, covering topics such as syntax, variables, data types, loops, conditionals, constructors, classes, arrays, inheritance, exception handling, and the collection framework. It includes focus areas for each topic and provides coding questions for exams to assess understanding and application of concepts. Additionally, it addresses GUI components using AWT and Swing, event handling, and JDBC connectivity for database operations.

Uploaded by

miracleclicks0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views13 pages

Question Java

The document outlines a comprehensive Java programming curriculum, covering topics such as syntax, variables, data types, loops, conditionals, constructors, classes, arrays, inheritance, exception handling, and the collection framework. It includes focus areas for each topic and provides coding questions for exams to assess understanding and application of concepts. Additionally, it addresses GUI components using AWT and Swing, event handling, and JDBC connectivity for database operations.

Uploaded by

miracleclicks0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

1–2: Java Basics

✔️Focus Areas:

Syntax


Variables


Data types


Loops


Conditionals

🧠 Exam Coding Questions:

Write a Java program to check if a number is prime.


Write a Java program to print Fibonacci series up to n terms.


Create a simple calculator using switch statement.


3–5: Constructor and Class Concept

✔️Focus Areas:

Class, Object, Constructor types (default, parameterized)


this keyword


Constructor Overloading

🧠 Exam Coding Questions:

Create a class Student with roll no and name. Use constructors to initialize
values and display.


Write a Java program to demonstrate constructor overloading.


Explain the difference between constructor and method with example.


6–8: Arrays (1D & 2D)

✔️Focus Areas:

Declaration, Initialization


Traversing arrays


Array of objects


Jagged arrays

🧠 Exam Coding Questions:

Write a Java program to find the largest element in an array.


Create a 2D matrix and perform addition of two matrices.


Store objects in an array and display their data.


9–11: Inheritance

✔️Focus Areas:

Single, Multilevel, Hierarchical


super keyword


Method Overriding


Access modifiers

🧠 Exam Coding Questions:

Implement single inheritance where class Employee extends Person.


Demonstrate multilevel inheritance with constructors.


Override a method in child class and show runtime polymorphism.


12–14: Exception Handling

✔️Focus Areas:

try-catch-finally, throw, throws


Checked vs Unchecked exceptions


Custom Exceptions

🧠 Exam Coding Questions:

Write code to handle divide-by-zero exception.


Create a custom exception InvalidAgeException and throw it if age < 18.


Use finally block and explain when it executes.

15–16: Collection Framework

✔️Focus Areas:


Interfaces: List, Set, Map


Implementations: ArrayList, LinkedList, Vector

🧠 Exam Coding Questions:

Create an ArrayList of names and print all using iterator.


Convert Vector to ArrayList.


Write a program to demonstrate List interface hierarchy.

17–19: Collection Classes

✔️Focus Areas:

Iterable, Collection Interface


Traversal: Iterator, ListIterator



Stack methods (push, pop, peek)

🧠 Exam Coding Questions:

Compare ArrayList vs LinkedList with performance.


Demonstrate stack using LinkedList class.


Convert ArrayList to Vector and back.

20–22: Deque & Set

✔️Focus Areas:

Deque as both queue & stack


HashSet vs TreeSet


ListIterator usage

🧠 Exam Coding Questions:


Implement stack using Deque.


Store unique student names using HashSet and display sorted using TreeSet.


Traverse a list forward and backward using ListIterator.

23–25: AWT Components & Layout Managers

✔️Focus Areas:

Frame, Label, Button, TextField


Layouts: Border, Grid, Flow, Box

🧠 Exam Coding Questions:

Create a simple login form using AWT.


Design a UI using GridLayout with 4 buttons.


Use FlowLayout to place 3 buttons in a Frame.

26–28: Swing & Frame Creation

✔️Focus Areas:

JFrame, JLabel, JButton


Adding components


Basic event handling

🧠 Exam Coding Questions:

Create a Swing frame with JLabel, JTextField, and JButton.


Show how to switch between two panels in Swing.

29–31: JComponent Widgets


✔️Focus Areas:

JRadioButton, JCheckBox, JComboBox, JList


Grouping radio buttons

🧠 Exam Coding Questions:

Create a form with gender selection using radio buttons.


Implement a drop-down menu with JComboBox.


Select multiple languages using JCheckBox.

32–35: Event Handling

✔️Focus Areas:

Event Delegation Model


ActionListener, ItemListener

Adapter classes

🧠 Exam Coding Questions:

Write code for ActionListener on a JButton.


Create a simple calculator using event listeners.


Explain Adapter class with MouseAdapter example.

36–39: JDBC Connectivity Intro

✔️Focus Areas:

Register Driver


Establish Connection


Execute SQL queries


🧠 Exam Coding Questions:

Write code to connect to MySQL using JDBC.


Show how to create a table in MySQL via Java.


Register and load JDBC driver with example.

40–42: JDBC Application (Insert, Select, Update,


Delete)

✔️Focus Areas:

Statement, PreparedStatement


executeQuery() vs executeUpdate()

🧠 Exam Coding Questions:

Write code to insert new record into students table.


Fetch all rows from employee table using ResultSet.


Update student marks using PreparedStatement.

You might also like