Skip to content

Latest commit

 

History

History
165 lines (111 loc) · 3.4 KB

File metadata and controls

165 lines (111 loc) · 3.4 KB

Java 1.3

A comprehensive guide to all Java 1.3 concepts with practical examples for interview preparation.

Table of Contents

  1. HotSpot JVM
  2. JNDI (Java Naming and Directory Interface)
  3. JavaSound API
  4. RMI over IIOP
  5. Common Interview Questions

1. HotSpot JVM

Java 1.3 introduced the HotSpot JVM, significantly improving performance.

Overview

HotSpot JVM provides adaptive optimization and better performance through just-in-time compilation.

Key Features

  • Adaptive optimization
  • Just-in-time (JIT) compilation
  • Better performance
  • Automatic optimization
  • Improved garbage collection

Benefits

  • Faster execution
  • Better memory management
  • Automatic optimization
  • Production-ready performance
  • No code changes needed

Note: This is a JVM-level improvement that doesn't require code changes.


2. JNDI (Java Naming and Directory Interface)

JNDI provides a standard API for accessing naming and directory services.

Overview

JNDI allows Java applications to access naming and directory services like LDAP, DNS, and file systems.

Basic Usage

import javax.naming.*;

// Lookup object
Context ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/jdbc/MyDB");

// Bind object
ctx.bind("myObject", new MyObject());

Key Features

  • Naming service access
  • Directory service access
  • LDAP support
  • DNS support
  • File system naming

See JNDIExample.java for complete example.


3. JavaSound API

JavaSound provides audio capabilities for Java applications.

Overview

JavaSound API allows Java applications to play, record, and manipulate audio.

Basic Usage

import javax.sound.sampled.*;
import java.io.File;

// Play audio file
AudioInputStream audioIn = AudioSystem.getAudioInputStream(new File("sound.wav"));
Clip clip = AudioSystem.getClip();
clip.open(audioIn);
clip.start();

Key Features

  • Audio playback
  • Audio recording
  • Audio format support
  • MIDI support
  • Sound mixing

See JavaSoundExample.java for complete example.


4. RMI over IIOP

RMI over IIOP enables RMI to work with CORBA using IIOP protocol.

Overview

RMI over IIOP allows Java RMI to interoperate with CORBA systems.

Key Features

  • CORBA interoperability
  • IIOP protocol support
  • Cross-language communication
  • Enterprise integration

Note: This is an advanced feature primarily for enterprise systems.


5. Common Interview Questions

Q1: What is HotSpot JVM?

A: High-performance JVM:

  • Adaptive optimization
  • JIT compilation
  • Better performance
  • Automatic optimization
  • Improved garbage collection

Q2: What is JNDI?

A: Java Naming and Directory Interface:

  • Standard API for naming services
  • Directory service access
  • LDAP support
  • Used in enterprise applications

Q3: What is JavaSound?

A: Audio API for Java:

  • Audio playback
  • Audio recording
  • MIDI support
  • Sound format support

Q4: What improvements did Java 1.3 bring?

A: Key improvements:

  • HotSpot JVM for better performance
  • JNDI for naming services
  • JavaSound for audio
  • RMI over IIOP for CORBA interoperability

Last Updated: 2025
Version: 1.0

This guide covers the features of Java 1.3, released on May 8, 2000.