Skip to content

Instantly share code, notes, and snippets.

@fermopili
Created March 19, 2017 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fermopili/0e7e9cc788725d2517092343e4ac084a to your computer and use it in GitHub Desktop.
Save fermopili/0e7e9cc788725d2517092343e4ac084a to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1305
/*
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