Created
March 19, 2017 12:19
-
-
Save fermopili/0e7e9cc788725d2517092343e4ac084a to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
4 ошибки | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
System.out.println( Dream.HOBBIE.toString()); | |
System.out.println(new Hobbie().toString()); | |
} | |
interface Desire { | |
} | |
interface Dream { | |
static Hobbie HOBBIE = new Hobbie(); | |
} | |
static class Hobbie implements Desire, Dream { | |
static int INDEX = 1; | |
@Override | |
public String toString() { | |
INDEX++; | |
return "" + INDEX; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment