Что здесь не так?
package com.javarush.task.task17.task1706;
/*
Синхронизированный президент
*/
public class Solution {
public static void main(String[] args) {
OurPresident expectedPresident = OurPresident.getOurPresident();
OurPresident ourPresident = OurPresident.getOurPresident();
System.out.println(expectedPresident == ourPresident );
public static class OurPresident{
private static OurPresident president;
public static OurPresident getOurPresident(){
return null;
}
static{
synchronized (OurPresident.class) {
president= new OurPresident();
}
}
}
}
}