What are the different data types in APEX?

Category: QuestionsWhat are the different data types in APEX?
1 Answers
Editor">Editor Staff answered 2 years ago

The different data types that are available in the APEX language are Primitive Data Type (Integer, Long, Double, Date, DateTime, ID, or Boolean and String), Collections (Lists, Maps, and Sets) and Enum Classes, Interfaces and Objects. The Primitive data type Integer can be any value of a 32-bit number and it will be having some range similar to that of Java programming language. A Boolean data type will be having a true and false value. The Date data type can only store the date value but not the time.
The Primitive data type Long can be any value of a 64-bit number and it will have some range similar to that of Java programming language. The String data type is a set of characters that will be initialized within single quotes. Enum is an abstract kind of data type.