Skip to header Skip to main navigation Skip to main content Skip to footer

User account menu

  • Log in
Home
COPA
Computer Operator and Programming Assistant

Main navigation

  • Home
    • COPA Assessment Criteria
    • COPA Job Role
    • Course Information
  • Books
  • Question Paper
  • Syllabus

Creating, implementing and extending interfaces

Breadcrumb

  • Home
  • Introduction to Programming in Java
  • Creating, implementing and extending interfaces

Network

ITI Trade Subject

  • ITI Electrician
  • ITI Fitter
  • ITI COPA
  • ITI Welder
  • ITI Mechanic
  • ITI Electronics
  • ITI Wireman
  • ITI Draughtsman Civil & Mech
  • ITI Refrigeration & Air Conditioning
  • ITI Turner
  • ITI Plumber
  • ITI Machinist
  • ITI Cosmetology
  • ITI Sewing
  • ITI Surveyor
By Anand | 12:53 PM IST, Fri March 13, 2026

Creating, Implementing and Extending Interfaces in Java

Java is an object-oriented programming language that supports advanced concepts such as inheritance, polymorphism, abstraction, and encapsulation. One important feature that helps achieve abstraction and multiple inheritance in Java is the interface.

Interfaces allow programmers to define a structure that classes must follow. They provide a way to declare methods without providing their implementation. Classes that implement the interface must provide the implementation for these methods.

For students studying the ITI COPA (Computer Operator and Programming Assistant) trade, understanding how to create, implement, and extend interfaces is important because interfaces are widely used in modern Java frameworks and software applications.

What is an Interface?

An interface in Java is a reference type similar to a class, but it contains only abstract methods and constants. Interfaces are used to define behavior that must be implemented by classes.

Interfaces are declared using the interface keyword.

Syntax

interface InterfaceName {

    void method1();
    void method2();

}

All methods inside an interface are abstract by default, and all variables are automatically public, static, and final.

Creating an Interface

Creating an interface is simple. It involves defining a set of method declarations that classes must implement.

Example of Creating an Interface

interface Animal {

    void eat();
    void sleep();

}

In this example, the Animal interface defines two methods: eat() and sleep(). These methods do not have any implementation.

Any class that implements this interface must define these methods.

Implementing an Interface

To implement an interface in Java, a class uses the implements keyword. The class must provide implementation for all methods declared in the interface.

Example

interface Animal {

    void eat();
    void sleep();

}

class Dog implements Animal {

    public void eat() {
        System.out.println("Dog eats food");
    }

    public void sleep() {
        System.out.println("Dog sleeps at night");
    }

}

Here, the Dog class implements the Animal interface and provides the implementation for both methods.

Main Program

public class TestInterface {

    public static void main(String[] args) {

        Dog d = new Dog();

        d.eat();
        d.sleep();

    }

}

Output:

Dog eats food
Dog sleeps at night

This program demonstrates how a class implements an interface.

Multiple Interfaces Implementation

One major advantage of interfaces is that a class can implement multiple interfaces. This helps achieve multiple inheritance in Java.

Example

interface A {

    void show();

}

interface B {

    void display();

}

class Test implements A, B {

    public void show() {
        System.out.println("Show method from interface A");
    }

    public void display() {
        System.out.println("Display method from interface B");
    }

}

Here, the Test class implements both interfaces A and B.

Extending Interfaces

Just like classes, interfaces can also extend other interfaces. This allows one interface to inherit the methods of another interface.

Interfaces extend other interfaces using the extends keyword.

Example

interface Animal {

    void eat();

}

interface Pet extends Animal {

    void play();

}

In this example, the Pet interface extends the Animal interface. It inherits the eat() method and adds a new method play().

Implementing Extended Interface

class Dog implements Pet {

    public void eat() {
        System.out.println("Dog eats food");
    }

    public void play() {
        System.out.println("Dog plays with ball");
    }

}

The Dog class must implement both methods: eat() and play().

Example Program

public class TestPet {

    public static void main(String[] args) {

        Dog d = new Dog();

        d.eat();
        d.play();

    }

}

Output:

Dog eats food
Dog plays with ball

This example shows how interfaces can extend other interfaces.

Features of Interfaces

Interfaces provide several useful features in Java programming.

  • Support abstraction
  • Allow multiple inheritance
  • Define common behavior for classes
  • Improve code flexibility

These features make interfaces an important part of Java programming.

Advantages of Using Interfaces

Interfaces offer many advantages in software development.

  • Promote loose coupling between classes
  • Improve code reusability
  • Provide better program structure
  • Allow flexible program design

Because of these advantages, interfaces are widely used in Java frameworks and APIs.

Applications of Interfaces

Interfaces are used in many types of software applications.

  • Graphical user interface libraries
  • Database connectivity (JDBC)
  • Enterprise software systems
  • Plugin-based applications

Many modern Java libraries rely heavily on interfaces to define common functionality.

Importance for ITI COPA Students

For students studying the ITI COPA trade, understanding interfaces helps in learning abstraction and multiple inheritance in Java.

Interfaces allow students to design flexible programs where multiple classes can implement the same behavior in different ways.

This concept also prepares students for advanced topics such as Java frameworks, API design, and software architecture.

Conclusion

Interfaces are an important feature of Java that help achieve abstraction and support multiple inheritance. They allow programmers to define method structures that must be implemented by classes.

By creating, implementing, and extending interfaces, developers can design flexible and reusable software systems.

For ITI COPA students, mastering interfaces provides a strong foundation for learning advanced Java programming and developing modern applications.

Book traversal links for Creating, implementing and extending interfaces

  • ‹ Creating and using Packages in JAVA
  • Up
  • Decision making and flow control using if…then, if then else, nested if, switch case and the conditional ternary operators in JAVA ›
  • Printer-friendly version

Article

Types of Files in Computer System
Safety Signs and Symbols Used in Workplace
Safety Rules While Using Computer
Can I start my own business after doing ITI in COPA trade?
Scope in Government Jobs after Doing ITI in COPA

Books

Introduction to Programming in Java
Programming language (Python)
Cloud Computing
Cyber Security
Advanced Excel Concepts
Database Concepts
Communicating in a Connected World
Using Spread Sheet Application
Designing Static Web Pages
Internet Concepts
Configuring and Using Networks
Database Management
Image editing, Creating presentations & Using Open Office
Using Word Processing Software
Familiarization with DOS CLI & Linux Operating Systems.
🖥️ Computer Hardware Basics and Software Installation
🖥️ Computer Components and Windows Operating System
Cyber Security
E Commerce
Smart Accounting
Introduction to VBA, Features and Applications
Introduction to JavaScript 🧠💻
Web Design Concepts
Internet Concepts 🌐
Networking Concepts 🌐
🗄️ Database Management Systems (DBMS)
Power Point Presentations
📊 Spreadsheet Application – Trade Theory for COPA
📝 Word Processing – Trade Theory for COPA
🖥️ Introduction to DOS Command Line Interface & Linux Operating System – Trade Theory for COPA
🖥️ Computer Hardware Basics and Software Installation – Trade Theory for COPA
Introduction to Computers and Windows Operating System

Question Paper

Hindi

COPA 2024 – प्रश्न पत्र सेट 11
COPA 2024 – प्रश्न पत्र सेट 1
COPA 2024 – प्रश्न पत्र सेट 2
COPA 2024 – प्रश्न पत्र सेट 3
COPA 2024 – प्रश्न पत्र सेट 4
COPA 2024 – प्रश्न पत्र सेट 5
COPA 2024 – प्रश्न पत्र सेट 6
COPA 2024 – प्रश्न पत्र सेट 7
COPA 2024 – प्रश्न पत्र सेट 8
COPA 2024 – प्रश्न पत्र सेट 9
COPA 2024 – प्रश्न पत्र सेट 10

English

ITI COPA 2023 Question Paper
ITI COPA 2023 Question Paper – Set 2
ITI COPA 2023 Question Paper – Set 3
ITI COPA 2023 Question Paper – Set 4

Common Subject

  • Engineering Drawing
  • Employability Skills
  • Workshop Calculation Science

Directory

  • Industrial Training Institutes
  • Engineering College
  • Medical College

Knowledge Bank

  • ITI Syllabus
  • Tools

Copyright © 2026 Company Name - All rights reserved

Developed and Designed by Alaa Haddad at Flash Web Center, LLC