Pagini: [1]   În jos
  Imprimă  
Ajutor Subiect: Quotes in Java  (Citit de 1105 ori)
0 Utilizatori şi 1 Vizitator pe acest subiect.
siliconvalleyguy
Strain


Karma: -2
Deconectat Deconectat

Mesaje: 6



Vezi Profilul
« : 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();}
                   }
          }
}

« Ultima modificare: Septembrie 22, 2011, 09:48:58 de către Cosmin Negruseri » Memorat
Pagini: [1]   În sus
  Imprimă  
 
Schimbă forumul:  

Powered by SMF 1.1.19 | SMF © 2006-2013, Simple Machines