Primitive Data Types

What is "data"?

 
 		
		











All data that we store in the computer has the following 4 things:

1. 2. 3. 4.

How do we create valid Java names (identifiers)?
 
 		
		












What are Java "reserved words" / "keywords"? (See page 23 of textbook for list.)
 
 		
		

















What style do we use to name variables (things that can change) and methods (things that accomplish a task)?
 
 		











What style do we use to name constants (things that don't change)?
 
 		
		








What style do we use to name classes (programs, types of objects)?
 
 		
		










What are the 8 "primitive" data types provided by Java?

1. 2. 3. 4. 5. 6. 7. 8.

What is the difference between the 4 types used to store integers?

 
  Type            Size	           Range	
		

_________     ____________      -128 - 127



_________     ____________      -32768  -  32767



_________     ____________      -2,147,483,648  -  2,147,483,647



_________     ____________      -9,223,372,036,854,775,808  - 

                                 9,223,372,036,854,775,807





















How do we create and use an integer "variable"?









How do we create and use an integer "constant"?




What is a floating point value?

 







What is the difference between the 2 types used to store floating point values?

 

  Type            Size	           Range	
		

_________     ____________      -3.4E+38  -  3.4E+3.8
                                
				7 significant digits








_________     ____________      -1.7E+308  -  1.7E+308
                                15 significant digits
				
				
				
				
				  

How do we create and use a floating point "variable"?












How do we create and use a floating point "constant"?






How big is the char type and how do we use it? What is Unicode, ASCII? (See Appendix C)






















How big is the boolean type and how do we use it?