/*
 *Created:	C. Whittington
 *Date:		Oct. 21 2003
 *Purpose:	This code introduces primative data types in Java.
 */

import java.awt.*;
import java.awt.event.*;

class DataTypes
{
	
	public static void main(String args[]) 
	{
		System.out.println("Starting Data Types...");
		
		/* 
		 *Each of the following 8 lines creates a variable of a 
		 *primative data type and assigns it an appropriate value.
		 */
		boolean BoolTest=true; // booleans can only be true or false
		char CharTest='a'; // char can hold any letter or number character
		byte ByteTest=127; // byte holds small integers
		short ShortTest=32767; // short holds integers upto 32767
		int IntTest=1000; // int holds integers upto 2^31 
		long LongTest=3000; // long hold integer upto 2^63
		float FloatTest=5; // float holds real numbers
		double DoubleTest=5554.1214; // doulbe holds very large real numbers
		
		// String is a very useful non-primative data type
		String StrTest = new String ("abcdefg");
		
		// Now that we have created 9 variables we will start to use them
		// First we will print all of the variables on the console window
		// \n means goto the next line
		// + means concatenation of strings (Many strings are put into one string
		
		// Try to guess what will be printed on the console screen after the program
		// runs.
		System.out.println (BoolTest+"\n"+CharTest+"\n"+ByteTest+"\n"+ShortTest);
		System.out.println (IntTest+"\n"+LongTest+"\n"+FloatTest+"\n"+DoubleTest+"\n");
		
		BoolTest = !BoolTest;
		CharTest = 'q';
		ByteTest--;
		ShortTest++;
		IntTest = IntTest+IntTest;
		LongTest = LongTest*LongTest;
		FloatTest = FloatTest / 4;
		DoubleTest = FloatTest / 6;
		
		// Use the chart at http://www.dsbn.edu.on.ca/schools/grimsbyss/mrw/TIK201/Notes/types.htm
		// to try to figure out what the new values will be.
		System.out.println ("Changed Values");
		System.out.println (BoolTest+"\n"+CharTest+"\n"+ByteTest+"\n"+ShortTest);
		System.out.println (IntTest+"\n"+LongTest+"\n"+FloatTest+"\n"+DoubleTest);
		
	}
}
