Le_D_Lab0b - System.out.println("*32 bit - intOne =

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - Dat Le //Date - 8/24/11 //Lab - 0b public class Lab0b { public static void main ( String[] args ) { //define 1 variable of each of the //following data types //byte short int long //float double //char boolean String //integer variables byte byteOne = 127; short shortOne = -32123; int intOne = 90877; long longOne = 999999999; //decimal variables float floatOne = 38.5678f; double doubleOne = 923.234; //other integer types char charOne = 'A'; //other types boolean booleanOne = true; String stringOne = "hello world"; //output your information here System.out.println("/////////////////////////////////"); System.out.println("*Jim Bob 08/18/06*"); System.out.println("* *"); System.out.println("* integer types *"); System.out.println("* *"); System.out.println("*8 bit - byteOne = "+byteOne+"\t\t\t*"); System.out.println("*16 bit - shortOne = "+shortOne+"\t\t*");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("*32 bit - intOne = "+intOne+"\t\t*"); System.out.println("*64 bit - longOne = "+longOne+"\t*"); System.out.println("* *"); System.out.println("* real types *"); System.out.println("* *"); System.out.println("*32 bit - floatOne = "+floatOne+"\t*"); System.out.println("*64 bit - doubleOne = "+doubleOne+"\t*"); System.out.println("* *"); System.out.println("* other integer types *"); System.out.println("* *"); System.out.println("*16 bit - charOne = "+charOne+"\t\t\t*"); System.out.println("* *"); System.out.println("* other types *"); System.out.println("* *"); System.out.println("*booleanOne = "+booleanOne+"\t\t\t\t*"); System.out.println("*stringOne = "+stringOne+"\t\t*"); System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\"); } }...
View Full Document

This note was uploaded on 11/11/2011 for the course C++ comp122 taught by Professor N/a during the Spring '07 term at Cy-Fair College.

Page1 / 2

Le_D_Lab0b - System.out.println("*32 bit - intOne =

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online