Online College Courses for Credit

Java - Basic Data Types

Java - Basic Data Types

Author: Nate Rock

The Goal of this Packet to introduce a learner to basic data types in Java.

What is the difference between and Object and a primitive in the Java programming language? This packet will introduce the concept and show you the 8 basic data types.

See More
Fast, Free College Credit

Developing Effective Teams

Let's Ride
*No strings attached. This college course is 100% free and is worth 1 semester credit.

37 Sophia partners guarantee credit transfer.

299 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 32 of Sophia’s online courses. Many different colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.


Objects vs primitives

To understand the basic java data types, one needs to make the distinction between Objects and primitives. Java has 8 basic primitives. These are all reserved keywords and don't share state with other primitive values. Objects can contain references to other variables and have functions defined for them.

Primitives and Literals

Video describing java primitives and literals.