Answer the question
In order to leave comments, you need to log in
How to compile a class in Java?
package ru.ncedu.java.tasks;
public interface Employee {
int getSalary();
public void increaseSalary(int value);
public String getFirstName(
String name
);
public void setFirstName(String firstName);
public String getLastName();
public void setLastName(String lastName);
public String getFullName();
public void setManager(Employee manager);
public String getManagerName();
public Employee getTopManager();
}
Answer the question
In order to leave comments, you need to log in
You need to create a class, for example Main, and create a main method in it:
public class Main{
public static void main (String[] args){
// тут код, который будет выполняться
}
}
Look, this is your interface, as you said, create an empty class for a start, then do
public class MainActivity implements НазваниеТвогоИнтерфейса{
after which the methods from your interface can be added to the main class and overridden already (do whatever you want with them).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question