Wednesday, 29 August 2012

Primitive Data Types and Variables - Apex Language Fundamentals


Apex has a number of primitive data types. Your data is stored in a variable matching one of these types, so in this tutorial you will learn a little about most of the available types and how to manipulate their values. Use the Developer Console to execute all of the examples in this tutorial.
These are the data types and variables that this tutorial covers.
  • String: Strings are set of characters and are enclosed in single quotes. They store text values such as a name or an address.
  • Boolean: Boolean values hold true or false values and you can use them to test whether a certain condition is true or false.
  • Time, Date and Datetime: Variables declared with any of these data types hold time, date, or time and date values combined.
  • Integer, Long, Double and Decimal: Variables declared with any of these data types hold numeric values.
  • Null variables: Variables that you don’t assign values to.
  • Enum: An enumeration of contant values.

No comments:

Post a Comment