Examples of Literal Values and Binding Time


/****************************************

Example of a Hard-Coded Variable in Java

*****************************************/

 import java.lancs.*;

 public class PrintCharacter
 {
         public static void main (String[] args) throws Exception
         {
                 char Character  = 'a';
                 System.out.println(Character);
         }
 }

/*************************************

Example of a Hard-Coded Variable in C

**************************************/

 #include < stdio.h >
 main()
 {
         int Number = 12;
         printf("%i\n", Number);
         return 0;
 }

These pages were edited for style and content by Allan Caine, Laura Drever, Gorana Jankovic, Megan King, and Marie Lewis.
The original authors of these pages were Graeme Humphries, Chantal Laplante, Chris Mills, and Melvin Lenz.

Last Modified: Wednesday, June 7th 23:45:30
Copyright 2000 Department of Computer Science, University of Regina.


[CS Dept Home Page]