Created
March 19, 2017 12:28
-
-
Save fermopili/636fab3a309f848a714d9fcd38333e7f to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1320
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
/* | |
Neo | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
System.out.println(Matrix.NEO); | |
} | |
static class Matrix | |
{ | |
public static DBObject NEO = new User().initializeIdAndName(1, "Neo"); | |
} | |
interface DBObject | |
{ | |
DBObject initializeIdAndName(long id, String name); | |
} | |
static class User implements DBObject | |
{ | |
long id; | |
String name; | |
public User initializeIdAndName(long id, String name) | |
{this.id=id; | |
this.name=name; | |
return this; | |
} | |
; | |
@Override | |
public String toString() | |
{ | |
return String.format("User has name %s, id = %d", name, id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment