infoarena

infoarena - concursuri, probleme, evaluator, articole => Informatica => Subiect creat de: Craciun Bogdan-George din Septembrie 21, 2011, 23:45:45



Titlul: Quotes in Java
Scris de: Craciun Bogdan-George din Septembrie 21, 2011, 23:45:45
Cod:
class Anonymous extends People{

           String share =  "http://anonops.blogspot.com/";

          // method that will prevail

          private void fightBack(){
                    System.out.println("Enough!");
          }
          
          // method that will inspire

          String shareThisInfo(){
                    return share;  
          }

          public static void main(String[] a){
                    String knowledge = "power";
                    boolean power = true;
                    if(power)
                             fightBack();
                    else {

                             try{
                                    Thread.sleep((int)Double.POSITIVE_INFINITY);
                             }catch(InterruptedException e)
                             {System.out.println("R.I.P.");}
                              finally {shareThisInfo();}
                   }
          }
}