0% found this document useful (0 votes)
9 views3 pages

Java Section BC Handwritten Notes-1

The document outlines key features of Java, including its simplicity, object-oriented nature, and platform independence. It discusses types of inheritance, constructors, exception types, polymorphism, applet life cycle, OOP principles, arrays, exception handling, AWT components, and JDBC steps. Each section provides concise definitions and examples relevant to Java programming.

Uploaded by

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

Java Section BC Handwritten Notes-1

The document outlines key features of Java, including its simplicity, object-oriented nature, and platform independence. It discusses types of inheritance, constructors, exception types, polymorphism, applet life cycle, OOP principles, arrays, exception handling, AWT components, and JDBC steps. Each section provides concise definitions and examples relevant to Java programming.

Uploaded by

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

Section B - Short Answer Questions (Detailed)

Q2. Features of Java:

1. Simple, Object-Oriented, Platform-Independent

2. Secure, Robust, Multithreaded, Dynamic

Q3. Types of Inheritance:

- Single, Multilevel, Hierarchical (No multiple via class)

- Use of Interface for multiple inheritance

Q4. Constructors:

- Default: A() { }

- Parameterized: A(int x) { }

- Copy: A(A obj) { }

Q5. Exception Types:

- Checked: IOException

- Unchecked: ArithmeticException

- Error: OutOfMemoryError

Q6. Polymorphism:

- Compile-time: method overloading

- Runtime: method overriding

Q7. Applet Life Cycle:

- init() -> start() -> paint() -> stop() -> destroy()


Section C - Long Answer Questions (Detailed)

Q8. OOP Principles:

- Encapsulation, Inheritance, Polymorphism, Abstraction

- Example: classes, interfaces, method overriding

Q9. Arrays in Java:

- Single Dim: int[] arr = {1,2}

- Multi Dim: int[][] mat = {{1,2},{3,4}}

Q10. Exception Handling:

- try, catch, finally

- Custom Exception class using extends Exception

Q11. AWT Components:

- Label, TextField, Button, Checkbox

- Layout: setBounds(), setLayout(null)

Q12. JDBC Steps:

- Load Driver, Get Connection, Create Statement, Execute Query, Close

Example:

Class.forName("...");

Connection con = DriverManager.getConnection(...);

Statement stmt = con.createStatement();


ResultSet rs = stmt.executeQuery(...);

You might also like