✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Given the following code, what will be the output?
interface Playable { void play();}
class Guitar implements Playable { public void play() { System.out.println("Playing guitar"); }}
class Piano implements Playable { public void play() { System.out.println("Playing piano"); }}
public class Test { public static void main(String[] args) { Playable p = new Guitar(); p.play(); p = new Piano(); p.play(); }}