xxxxxxxxxx
sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt-get update
xxxxxxxxxx
// Interface definition
interface Vehicle {
void startEngine();
}
// Class that implements the interface
class Car implements Vehicle {
public void startEngine() {
System.out.println("Car engine started.");
}
}
// Usage of the interface
public class Main {
public static void main(String[] args) {
Vehicle myCar = new Car(); // Using the interface type
myCar.startEngine(); // Calling the method
}
}