zoukankan      html  css  js  c++  java
  • Java其实不支持垃圾回收

    Java其实不支持垃圾回收。如果真的支持的话,大多数Java程序在运行的一开始就应该把程序本身删除,因为这些程序本身就是垃圾。 
      
    // TODO: This is a 分割线. Please no modify this line. 
      
    某公司有个老MFC程序员,10年前C++和MFC横扫千军的时候风光无限。如今改用Java。在他的领导下,他和他的部下们写Java程序还沿用C++的匈牙利命名法。如下: 

     1 class CBookRecord { 
     2      private String m_strName; 
     3      private CAuthor m_pAuthor; 
     4      private int m_nVolumes; 
     5      private double m_fpPrice; 
     6    
     7      public CBookRecord(String strName, CAuthor pAuthor, 
     8              int nVolumes, double fpPrice) { 
     9          this.m_strName = strName; 
    10          this.m_pAuthor = pAuthor; 
    11          this.m_nVolumes = nVolumes; 
    12          this.m_fpPrice = fpPrice; 
    13      } 
    14    
    15      public String GetName() { 
    16          return this.m_strName; 
    17      } 
    18    
    19      public void SetName(String strName) { 
    20          this.m_strName = strName; 
    21      } 
    22    
    23      public UpdateDataBase(...) { 
    24           ... 
    25      } 
    26  }

    /* 我是华丽的分割线 */ 
      
    美国某个大学讲Java课。一节Java课后,一名男生大胆地摸另一名女生的胸。 
      
    女生说:这是私有的,你不能摸。 
      
    男生感觉很疑惑,回答:可是我们在同一个班(class)里阿。 
      
    /************** SEPARATOR ***************/ 
      
    C++和Java去酒吧,服务员给C++一杯冰啤,C++笑着说:“谢谢!烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫” 
      
    服务员很疑惑,Java解释说,他忘了加''了。 

    来源:北邮论坛

    Winners see the gain; Losers see the pain.
  • 相关阅读:
    Qt编程之qrc文件的链接
    Visual Studio中的lib的链接顺序
    c++语言中的遍历
    转载:使用 OpenCV 识别 QRCode
    GreenOpenPaint的实现(四)放大缩小处理滚动事件
    GreenOpenPaint的实现(六)图片的保存和打开
    GreenOpenPaint的实现(五)矩形框
    GreenOpenPaint的实现(三)添加标尺
    GreenOpenPaint的实现(二)打开显示图片
    GreenOpenPaint的实现(一)基本框架
  • 原文地址:https://www.cnblogs.com/chengyeliang/p/3528017.html
Copyright © 2011-2022 走看看