Friday, 28 November 2025

Java Unit Wise Notes

 JAVA Notes 


---


UNIT-I DETAILED NOTES (JAVA)


1. History of Java


Developed by James Gosling at Sun Microsystems (1991–1995).


Initially called Oak, renamed to Java in 1995.


Designed for embedded systems, later used widely for web, mobile, and enterprise applications.


Key features:


Platform Independent (Write Once, Run Anywhere)


Object Oriented


Robust


Secure


Distributed


Multithreaded


High Performance (via JIT)





---


2. Basic Terms and Definitions


Term Meaning


JDK Java Development Kit (compiler + libraries + JVM)

JRE Java Runtime Environment (JVM + libraries)

JVM Java Virtual Machine (executes bytecode)

Bytecode Intermediate machine-independent code generated by compiler

Class Blueprint or template for objects

Object Instance of a class




---


3. Data Types


Primitive Data Types


1. byte – 1 byte



2. short – 2 bytes



3. int – 4 bytes



4. long – 8 bytes



5. float – 4 bytes



6. double – 8 bytes



7. char – 2 bytes (Unicode)



8. boolean – 1 bit




Non-Primitive Data Types


String


Arrays


Classes, Interfaces, Enums




---


4. Variables


Types of variables


Local variables – inside methods, no default values


Instance variables – inside class, outside method


Static variables – shared by all objects of a class



Scope and Lifetime


Local → scope within block; destroyed when block ends


Instance → scope throughout object; destroyed on garbage collection


Static → scope throughout class; destroyed at program termination




---


5. Arrays


Collection of similar data stored in contiguous memory.


Types:


One-dimensional


Multi-dimensional


Jagged arrays (arrays of arrays)




Example:


int[] a = new int[5];

int[][] b = new int[3][4];



---


6. Operators


Types of Operators


Arithmetic: +, -, *, /, %


Relational: <, >, <=, >=, ==, !=


Logical: &&, ||, !


Bitwise: &, |, ^, ~


Assignment: =, +=, -=, *= …


Unary: ++, --


Ternary: ?:


Shift: <<, >>, >>>




---


7. Expressions


Combination of variables, operators, literals, e.g.,



int c = a + b * 2;



---


8. Control Statements


Selection


if, if-else, nested if


switch



Iteration


for


while


do-while


enhanced for loop



Jump


break


continue


return




---


9. Type Conversion and Casting


Implicit (Widening)


byte → short → int → long → float → double


Explicit (Narrowing)


double → float → long → int → short → byte


double d = 10.5;

int i = (int)d;   // explicit



---


10. Simple Java Program


class Hello {

    public static void main(String[] args) {

        System.out.println("Hello Java");

    }

}



---


11. Concepts of Classes


A class is a collection of:


variables (fields)


methods


constructors


blocks

Defines the blueprint of an object.





---


12. Objects


Created using new keyword:



Student s = new Student();


Occupies memory on heap.




---


13. Constructors


Special method called at object creation.


Has same name as class.


No return type.


Types:


Default


Parameterized


Copy constructor (not built-in)





---


14. Methods


Block of code executed when called.


Syntax:



returnType methodName(parameters) { }



---


15. Access Control Modifiers


public – accessible everywhere


protected – within package + subclass


default – within package


private – within class




---


16. this Keyword


Used to refer:


current object


current class instance variable


invoke current class methods


call constructors (this())




---


17. Garbage Collection


Java automatically frees unused objects.


Methods:


System.gc() requests GC


finalize() called before destruction (deprecated now)





---


18. Overloading Methods and Constructors


Method Overloading


Same method name, different parameters.



Example:


int add(int a, int b)

double add(double a, double b)


Constructor Overloading


Multiple constructors with different parameter lists.




---


19. Method Binding


Early Binding (Compile-time)


Overloaded methods


Private, static, final methods



Late Binding (Runtime)


Overridden methods (using dynamic dispatch)




---


20. Inheritance


Mechanism of acquiring features of another class.


Types:


Single


Multilevel


Hierarchical


Hybrid (using interfaces)




Syntax:


class B extends A { }



---


21. Method Overriding


Same method name & parameters in subclass.


Runtime polymorphism.


Requires inheritance.


Uses @Override annotation.




---


22. Exceptions


Runtime errors handled using exception handling.



Keywords:


try


catch


throw


throws


finally



Types:


Checked (IOException, SQLException)


Unchecked (NullPointerException, ArithmeticException)




---


23. Parameter Passing


Java supports pass-by-value:


For primitives → value copied


For objects → reference copy passed




---


24. Recursion


Method calls itself.


Must have a base condition.



Example:


int fact(int n) {

    if(n==1) return 1;

    return n * fact(n-1);

}



---


25. Nested and Inner Classes


Types


1. Member Inner Class



2. Static Nested Class



3. Local Inner Class



4. Anonymous Inner Class




Used for:


event handling


logical grouping


data hiding




---


26. Exploring String Class


Immutable class in java.lang package.


Created in two ways:



String s1 = "Hello";          // String literal (String pool)

String s2 = new String("Hi"); // Heap


Common methods:


length()


charAt()


substring()


equals()


compareTo()


toUpperCase()


toLowerCase()


trim()


replace()


UNIT II: INHERITANCE, PACKAGES & INTERFACES – Complete Notes



---


1. INHERITANCE


Definition


Inheritance is a mechanism where a new class (subclass/derived class) acquires the properties and behaviors of an existing class (superclass/base class).

It supports code reusability, extensibility, polymorphism, and hierarchical relationships.



---


1.1 Hierarchical Abstractions


Abstraction in Java can be organized in a hierarchy using inheritance.


Higher-level classes contain more general behavior.


Lower-level classes provide more specific behavior.



Example:


Animal → Mammal → Dog


Each level hides details and moves from general → specific.



---


1.2 Base Class Object


The class whose features are inherited is called the base class or superclass.


Example:



class Animal { ... }


Animal is the base class.



---


1.3 Subclass


The class which inherits is called subclass or derived class.



class Dog extends Animal { ... }



---


1.4 Subtype


A subtype is a derived type that can be substituted wherever its base type is expected.


Subclass is always a subtype of superclass.




---


1.5 Substitutability (Liskov substitution principle)


Objects of subclass can replace objects of superclass without affecting correctness.



Example:


Animal a = new Dog(); // Valid



---


2. FORMS OF INHERITANCE


Java supports:


2.1 Specialization


Subclass adds more specific features to superclass.



Vehicle → Car


2.2 Specification


Subclass provides implementation of abstract methods of abstract class or interface.



2.3 Construction


Subclass constructs new behavior by adding new fields and methods.



2.4 Extension


Subclass extends the superclass functionality.



2.5 Limitation


Subclass may restrict the behavior of superclass by overriding.



2.6 Combination


Combining behaviors of multiple classes using interfaces (as Java does not support multiple inheritance).




---


3. BENEFITS OF INHERITANCE


1. Code Reusability – no need to write code again.



2. Faster Development – reuse tested classes.



3. Method Overriding & Polymorphism.



4. Extensibility – easily modify or add features.



5. Hierarchical Classification – natural mapping of real world.





---


4. COSTS OF INHERITANCE


1. Increased complexity – deep hierarchy becomes hard to manage.



2. Tight coupling between superclass and subclass.



3. Inheritance misuse may lead to poor design.



4. Performance overhead due to dynamic binding.



5. Fragile base class problem – change in base class may break subclasses.





---


5. MEMBER ACCESS RULES IN INHERITANCE


Modifier Same Class Same Package Subclass Other Package


private Yes No No No

default Yes Yes No No

protected Yes Yes Yes No

public Yes Yes Yes Yes




---


6. USES OF super


super is used to:


1. Call superclass constructor:




super();


2. Call superclass method:




super.display();


3. Access superclass data members:




super.value;



---


7. USING final WITH INHERITANCE


final class


Cannot be inherited:



final class A {} // cannot extend


final method


Cannot be overridden:



final void show() {}


final variable


Constant; value cannot change.




---


8. POLYMORPHISM


Definition


Polymorphism means “one name, many forms”.


Types:


1. Compile-time (overloading)



2. Run-time (overriding)





---


8.1 Method Overriding


Same method name, same signature, but implemented in subclass.



Rules:


1. Must have same return type and parameters.



2. Cannot reduce visibility.



3. Cannot override final or static methods.



4. Access through base class reference leads to run-time polymorphism.





---


8.2 Abstract Classes


Cannot be instantiated.


May contain abstract methods.



abstract class Shape {

    abstract void draw();

}



---


8.3 The Object Class


Root of Java class hierarchy.


All classes implicitly extend Object.



Important methods:


toString()


equals()


hashCode()


clone()


getClass()


finalize()




---


9. PACKAGES


A package in Java is a group of related classes and interfaces.



---


9.1 Defining a Package


package mypack;



---


9.2 Creating and Accessing a Package


Steps:


1. Write package statement.



2. Compile with directory structure.



3. Import using:




import mypack.*;



---


9.3 Understanding CLASSPATH


CLASSPATH is an environment variable that tells JVM where to find classes and packages.


We set:



set classpath=C:\java\mypack;



---


9.4 Importing Packages


import java.util.Scanner;

import java.io.*;



---


10. INTERFACES



---


10.1 Difference Between Class and Interface


Classes Interfaces


Can have implemented methods Only abstract methods (Java 8+ allows default & static)

Supports single inheritance only Supports multiple interface inheritance

Can create object Cannot create objects

Contains variables with any access modifier variables are public static final by default




---


10.2 Defining an Interface


interface Animal {

    void sound();

}



---


10.3 Implementing Interface


class Dog implements Animal {

    public void sound() {

        System.out.println("Bark");

    }

}



---


10.4 Applying Interfaces


Used for:


Achieving multiple inheritance


Loose coupling


Implementing callback functions


Achieving abstraction




---


10.5 Variables in Interface


Always public static final


Must be initialized.



Example:


interface Test {

    int x = 10;

}



---


10.6 Extending Interfaces


interface A { void display(); }

interface B extends A { void show(); }



---


11. Exploring java.io Package


The java.io package provides classes for input and output operations.


Main categories:


1. Streams


Byte Streams


FileInputStream, FileOutputStream



Character Streams


FileReader, FileWriter



Buffered Streams


BufferedReader, BufferedWriter




2. File Handling


File class:

Functions such as:


create


delete


exists


length


list files


get path




3. Console I/O


BufferedReader br = new BufferedReader(new InputStreamReader(System.in));


System.in, System.out, System.err



4. Serialization


ObjectOutputStream


ObjectInputStream Used to save/retrieve objects to/from files.






📘 Unit III – Exception Handling & Multithreading (Detailed Notes)



---


1. EXCEPTION HANDLING


1.1 Concept of Exception Handling


An exception is an abnormal condition or run-time error that disrupts the normal flow of a program.


Exception handling is a mechanism to detect, handle, and recover from these errors without terminating the program abnormally.



Examples of exceptions


Division by zero → ArithmeticException


Array index out of range → ArrayIndexOutOfBoundsException


Null reference → NullPointerException


File not found → FileNotFoundException




---


1.2 Benefits of Exception Handling


1. Improved program reliability

Prevents program crash.



2. Separation of error-handling code from main logic.



3. Propagating errors to calling methods.



4. Grouping of error types using exception hierarchy.



5. Improved debugging and maintainability.





---


1.3 Termination vs Resumptive Models


Termination Model (Java uses this)


Once an exception occurs, control never returns to the point of error.


Program continues after the catch block.



Resumptive Model


Control returns to the point of error after handling.


Java does NOT support resumptive model (older languages like Smalltalk do).




---


1.4 Exception Hierarchy


Throwable

                 /           \

         Exception           Error

            |

     (RuntimeException etc.)


Throwable


Superclass of all exceptions.



Exception


Recoverable conditions (e.g., file not found).



Checked Exceptions:


Compiler checks → must handle using try/catch or throws.

Examples: IOException, SQLException.


Unchecked Exceptions (RuntimeException):


Due to programming errors.

Examples: NullPointerException, ArithmeticException.


Error


Serious problems → cannot be handled.

Examples: OutOfMemoryError, StackOverflowError.




---


1.5 Usage of try, catch, throw, throws, finally


try block


Contains code that may produce an exception.


catch block


Handles specific exceptions.


finally block


Always executes (except System.exit).


Used for closing files, connections.



throw


Used to throw an exception manually.


throws


Declared in method signature when method may throw a checked exception.



---


1.6 Built-in Exceptions


Some common Java exceptions:


ArithmeticException


ArrayIndexOutOfBoundsException


StringIndexOutOfBoundsException


NullPointerException


NumberFormatException


ClassNotFoundException


IOException


InterruptedException


IllegalArgumentException




---


1.7 Creating User-Defined Exceptions


Steps:


1. Extend the Exception class.



2. Provide constructors.



3. Use throw to throw it.





---


2. STRING HANDLING


2.1 String Class


Immutable (cannot be changed once created)


Stored in String Constant Pool



2.2 StringBuffer


Mutable (can be modified)


Thread-safe (synchronized)


Slightly slower



2.3 StringBuilder


Mutable


Not synchronized (faster)




---


3. EXPLORING java.util


Important classes in java.util:


ArrayList


LinkedList


HashMap


HashSet


Hashtable


Stack


Collections class (utility functions like sort, reverse)


Date, Calendar, Random


Scanner (for input)




---


4. MULTITHREADING


4.1 Differences between Multithreading & Multitasking


Multitasking


Running multiple programs at the same time.


Example: Chrome + Word + Music.



Multithreading


Running multiple parts of the same program concurrently.


Example: Game (sound + graphics + user input).




---


4.2 Thread Life Cycle


New → Runnable → Running → Blocked/Waiting → Terminated


1. New


Object created but thread not started.


2. Runnable


Ready to run when CPU is free.


3. Running


Executing code.


4. Blocked/Waiting


Waiting for resources or sleeping.


5. Terminated


Thread ends.



---


4.3 Creating Threads


Method 1: Extending Thread class


Override run() → call start().


Method 2: Implementing Runnable


Create object → pass to Thread.


Preferred method: Runnable (supports multiple inheritance through interfaces).



---


4.4 Thread Priorities


Range 1 to 10


MIN_PRIORITY = 1


NORM_PRIORITY = 5


MAX_PRIORITY = 10

Used to request thread scheduling order (not guaranteed).




---


4.5 Synchronizing Threads


Need


Avoid conflicts in shared data.


Synchronization types


1. Synchronized method



2. Synchronized block




synchronized(obj) {

    // critical section

}


Prevents race conditions.



---


4.6 Inter-Thread Communication


Achieved using:


wait()


notify()


notifyAll()



Used for producer–consumer problems.



---


4.7 Thread Groups


Threads can be grouped.


Helps managing multiple threads together.




---


4.8 Daemon Threads


Background service threads.


Example: Garbage Collector.


Created using setDaemon(true).




---


5. ENUMERATIONS (enum)


Represent a fixed set of constants.


Type-safe.



Example:


enum Color { RED, GREEN, BLUE }



---


6. AUTOBOXING & UNBOXING


Autoboxing


Primitive → Wrapper object

int → Integer


Unboxing


Wrapper → Primitive

Integer → int


Example:


Integer a = 10;  // autoboxing

int b = a;       // unboxing



---


7. ANNOTATIONS


Used to provide metadata.


Common annotations:


@Override


@Deprecated


@SuppressWarnings



Custom annotation can be created using @interface.



---


8. GENERICS


Allows type-safe classes, methods, and interfaces.


Eliminates casting.



Example:


ArrayList<String> list = new ArrayList<>();


Benefits


Compile-time type safety


Avoids ClassCastException


Reusability


Cleaner code





UNIT IV – EVENT HANDLING & AWT (DETAILED NOTES)


---

1. EVENT HANDLING

1.1 What is an Event?

An event is an action or occurrence generated by the user or system.

Examples: mouse click, key press, window closing, button press, item selection, scrolling etc.


Types of Events

1. User-generated events – mouse, keyboard, button click etc.


2. System-generated events – window opened, window closed, component moved, component resized etc.




---

1.2 Event Sources

An event source is an object that generates events.

Example:

Button → generates ActionEvent

TextField → generates TextEvent

Frame → generates WindowEvent

Mouse → generates MouseEvent



Every event source notifies event listeners when an event occurs.


---

1.3 Event Classes

Java provides event classes inside the package java.awt.event.

Common Event Classes

Event Class Generated When

ActionEvent Button clicked, menu selected
MouseEvent Mouse pressed, released, clicked, moved
MouseMotionEvent Mouse moved or dragged
KeyEvent Key pressed, released, typed
WindowEvent Window opened, closed, iconified
ItemEvent Item selected in Checkbox, Choice, List
TextEvent Text changed



---

1.4 Event Listeners

Event listener is an interface that contains methods to handle events.

Listener Interface Purpose

ActionListener Handles ActionEvent
MouseListener Handles button press, release, click
MouseMotionListener Handles mouse movement
KeyListener Handles keyboard events
WindowListener Window events
ItemListener Handles item selection
TextListener Text modification


Steps in Event Handling

1. Create a component (ex: Button b)


2. Implement the listener interface


3. Register listener with component


4. Override event handler methods



Example:

b.addActionListener(this);


---

1.5 Delegation Event Model

Introduced in Java 1.1
It separates event generation and event handling.

Working

1. Event is generated by an event source.


2. Event is delegated to listener object.


3. Listener executes event handling method.



Advantages

Simple, fast, and efficient.

Reduces memory and improves performance.

Clear separation of code.



---

1.6 Handling Mouse Events

Using MouseListener and MouseMotionListener.

MouseListener Methods:

mouseClicked()

mousePressed()

mouseReleased()

mouseEntered()

mouseExited()


MouseMotionListener Methods:

mouseMoved()

mouseDragged()



---

1.7 Handling Keyboard Events

Using KeyListener.

Methods:

keyPressed(KeyEvent e)

keyReleased(KeyEvent e)

keyTyped(KeyEvent e)



---

1.8 Adapter Classes

Adapter classes provide empty implementations of listener interfaces.

Used when we do NOT want to implement every method in a listener interface.


Common Adapter Classes:

MouseAdapter

MouseMotionAdapter

KeyAdapter

WindowAdapter


Example:

addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
        System.exit(0);
    }
});


---

2. AWT (ABSTRACT WINDOW TOOLKIT)

2.1 AWT Class Hierarchy

Top-level classes:

1. Component – Base class for all AWT components


2. Container – Can contain other components


3. Panel – Simplest container


4. Window – Top level window


5. Frame – Main window with title bar


6. Dialog – Popup dialog window




---

3. USER INTERFACE COMPONENTS

3.1 Label

Displays text that cannot be edited.


Label l = new Label("Name:");

3.2 Button

Button b = new Button("Submit");

3.3 TextField

Allows single-line text input.

3.4 TextArea

Multi-line text input.

3.5 Checkbox

Single checkbox.

Checkbox c = new Checkbox("Java");

3.6 CheckboxGroup

Creates radio buttons.

CheckboxGroup cg = new CheckboxGroup();
Checkbox c1 = new Checkbox("Male", cg, true);

3.7 Choice (Dropdown)

Choice ch = new Choice();
ch.add("Red");
ch.add("Blue");

3.8 List

Displays multiple selectable items.

3.9 Scrollbar

Horizontal or vertical scroll.

3.10 Canvas

Area used for drawing shapes or graphics.


3.11 Panel

Container used to group components.


3.12 ScrollPane

Scrollable view for components.


3.13 Dialog

Popup window for messages/input.

3.14 MenuBar, Menu, MenuItem

Used to create menus.


---

4. GRAPHICS

Used for drawing shapes, text, and images.

Methods of Graphics class:

drawLine()

drawRect()

fillRect()

drawOval()

drawString()

setColor(Color c)



---

5. LAYOUT MANAGERS

Layout managers determine how UI components are arranged.

5.1 FlowLayout

Default for applet and panel.

Arranges components left to right.


5.2 BorderLayout

Divides container into North, South, East, West, Center.


5.3 GridLayout

Creates a grid of rows and columns.


5.4 CardLayout

Multiple components stacked like a card deck.

Only one is visible at a time.


5.5 GridBagLayout

Most flexible layout.

Allows components of different sizes.

Uses GridBagConstraints.



---

Summary

This unit covers:

Event handling concepts

Event classes & listeners

Delegation model

Mouse & keyboard events

Adapter classes

AWT interface components

Graphics

Layout managers




UNIT V – APPLETS AND SWING (DETAILED NOTES)


---

PART – A: APPLETS

1. Concepts of Applets

An applet is a small Java program that runs inside a web browser or applet viewer.

Applets are client-side programs, downloaded from a server and executed safely in a sandbox environment.

They do not have a main() method.

Applets run inside a container provided by the browser and rely on methods defined in java.applet.Applet class.


Key Features

Platform independent

Secure and sandboxed

GUI-based

Event-driven

Runs inside HTML pages



---

2. Differences Between Applets and Applications

Applets Applications

Runs in browser/applet viewer Runs independently
No main() method Must have main() method
Restricted by security rules No restrictions
Requires HTML file to launch Direct execution via JVM
GUI-based by default May or may not have GUI



---

3. Life Cycle of an Applet

Applet lifecycle methods (from Applet class):

1. init()

Called once when applet starts.

Used for initialization (variables, UI components).



2. start()

Called after init().

Also called every time the applet becomes active.



3. paint(Graphics g)

Called to redraw the contents.

Used for drawing shapes, text, images.



4. stop()

Called when the user leaves the applet page.

Suspends execution.



5. destroy()

Called before applet is removed from memory.

Used to release resources.





---

4. Types of Applets

1. Based on Display:

Graphical applet

Non-graphical applet



2. Based on Embedding:

Applets embedded using <applet> tag

Applets embedded using <object> tag



3. Based on Functionality:

Standalone applet (runs in applet viewer)

Internet-based applet (runs in browser)





---

5. Creating an Applet (Steps)

1. Create a class extending Applet or JApplet.


2. Override lifecycle methods (init, paint).


3. Save the .java file and compile.


4. Create an HTML file with <applet> tag or use applet viewer:

appletviewer filename.html




---

6. Passing Parameters to Applets

Using <param> tag inside HTML:


<applet code="DemoApplet.class" width="300" height="300">
    <param name="username" value="Manisha">
</applet>

Retrieve in the applet using:


String user = getParameter("username");


---

PART – B: SWING

1. Introduction to Swing

Swing is a part of Java Foundation Classes (JFC) used to create modern GUI applications.

Features

Lightweight components

Platform-independent

Highly customizable

Supports pluggable Look and Feel

Uses MVC design pattern



---

2. Limitations of AWT

Platform dependent (uses native windowing)

Limited set of components

Less flexible and not customizable

Heavyweight components (slower performance)


Swing was developed to overcome these limitations.


---

3. MVC Architecture in Swing

Swing components follow Model–View–Controller architecture:

1. Model – data storage


2. View – how data is displayed


3. Controller – handles user interaction



Swing internally merges View + Controller (called UI Delegate).


---

4. Components and Containers

Components

All GUI elements (buttons, text fields, labels).

Containers

Hold other components.
Examples:

JFrame

JPanel

JApplet


Containers have layout managers to arrange components.


---

5. Exploring Important Swing Classes

(a) JApplet

Swing equivalent of Applet

Supports rich components

Uses same lifecycle as Applet


(b) JFrame

Top-level window

Used for standalone GUI applications

Contains:

Title bar

Menu bar

Content pane



(c) JComponent

Base class for almost all Swing components

Supports:

Borders

Double-buffering

Tooltips




---

6. Icons and Labels

Icons

Used to display images:
ImageIcon icon = new ImageIcon("pic.png");

JLabel

Displays:

Text

Icons or both



---

7. Text Fields

Implemented using JTextField

Used for inputting single-line text

Methods:

getText()

setText()




---

8. Buttons

JButton Class

A push button

Supports text, icons, event listeners

Example:


JButton b = new JButton("Submit");


---

9. Check Boxes

JCheckBox

Used for multiple selections

Example:


JCheckBox c = new JCheckBox("Java");


---

10. Radio Buttons

JRadioButton

Only one option selected at a time

Used with ButtonGroup:


ButtonGroup bg = new ButtonGroup();
bg.add(r1); bg.add(r2);


---

11. Combo Boxes

JComboBox

Dropdown selection list

Supports editable mode as well



---

12. Tabbed Panes

JTabbedPane

Multiple tabs in a single window

Example:


JTabbedPane tp = new JTabbedPane();
tp.addTab("Tab1", panel1);


---

13. Scroll Panes

JScrollPane

Adds scrolling capability to large components

Commonly used with:

JTextArea

JTable

JList




---

14. Trees

JTree

Displays hierarchical data like file system

Nodes can be expanded/collapsed

Used in file explorers



---

15. Tables

JTable

Displays data in rows and columns

Often used with TableModel

Allows sorting, editing, and custom rendering



---

Summary (Short Notes for Quick Revision)

Applet: Runs in browser, no main(), uses lifecycle methods.

Swing: Lightweight, platform independent, rich components.

JApplet, JFrame, JComponent are core classes.

Common Swing controls: JButton, JLabel, JTextField, JCheckBox, JRadioButton, JComboBox, JTabbedPane, JScrollPane, JTree, JTable.



No comments:

Post a Comment

Java Unit Wise Notes

 JAVA Notes   --- UNIT-I DETAILED NOTES (JAVA) 1. History of Java Developed by James Gosling at Sun Microsystems (1991–1995). Initia...