0% found this document useful (0 votes)
60 views1 page

Class DRV Extends Abstracttrial (Public Void Displayemp (System - Out.Println ("I Am in Display: Derived Class") )

This Java code defines a Drv class that extends an AbstractTrial class. The Drv class contains a displayEmp method that prints a message to the console. The main method creates an AbstractTrial object using the Drv class and calls the displayEmp method, printing the message to the console.

Uploaded by

dharmeshtr
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)
60 views1 page

Class DRV Extends Abstracttrial (Public Void Displayemp (System - Out.Println ("I Am in Display: Derived Class") )

This Java code defines a Drv class that extends an AbstractTrial class. The Drv class contains a displayEmp method that prints a message to the console. The main method creates an AbstractTrial object using the Drv class and calls the displayEmp method, printing the message to the console.

Uploaded by

dharmeshtr
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/ 1

class Drv extends AbstractTrial

public void displayEmp() {

System.out.println("I am in display: derived class");

public static void main(String args[]) {

AbstractTrial a = new Drv();

//Drv d = new Drv();

a.displayEmp();

You might also like