Question: 1. One Java interface with one method. 2. Two different Java classes (also known as concrete class) that implement that method, but each class does

1. One Java interface with one method.

2. Two different Java classes (also known as concrete class) that implement that method, but each class does something different. You can just write System.out.println so show something different.

3. Write a Java class with java main method that will execute the two different concrete classes and will display two different outputs.

4. Include all the code example with screen shot of your run.

One important difference between languages that provide syntax to encapsulate the definition of user defined data types is whether the syntax requires the specification details to be separated from the implementation details.

In Java programming, you can define an interface and a concrete class. Provide Java code examples that you have written yourself on:

In Java, you can also do superclass and subclass.

1. Write one abstract class with one abstract method.

2. Write one concrete class, which will extend the above abstract class. Just have one System.out.println to demonstrate what it does.

3. Write one Java class with main to invoke this concrete class.

All the above should be only a few lines of code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!