Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
Java Language EssentialsDownload tutorial zip fileEmail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
Course Notes
  


Scope overrides and this page 34 of 37


The notion of the this variable in the Java programming language, referring to the target of a message send, has a few analogs in the COBOL world.

In COBOL, the record buffer associated with a file is sort of a "cursor" or "current record" buffer that changes as you read through the file. If you walk through a list of Java objects, sending them each a message, the this variable will refer to each of the objects in turn just like the moving file cursor.

The ambiguity resolution or scope override ability of the this variable also has an analog in COBOL. When you have two items in two different tables or files with the same name, you must use the OF clause to indicate which one you are referring to such as StudentName OF StudentFile.


copyright 1996-2000 Magelang Institute dba jGuru


Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
PrivacyLegalContact