home *** CD-ROM | disk | FTP | other *** search
/ Java by Example / jbecd.bin / JBE-CD / NTUsers / JBECODE.ZIP / JavaByExample / chap05 / lst5_3.txt < prev   
Text File  |  1996-04-24  |  287b  |  20 lines

  1. public class Block1 extends Applet
  2. {
  3.     int value1 = 32;
  4.  
  5.     void Block2()
  6.     {
  7.         float value2 = 4.5f;
  8.         value1 = 45;
  9.     }
  10.  
  11.     void Block3()
  12.     {
  13.         value1 = 100;
  14.  
  15.         // The following line causes an error.
  16.         value2 = 55.46f;
  17.     }
  18. }
  19.  
  20.