Apex
Apex - Strings program
Apex - Arrays program
Apex supports various data types for defining and working with different kinds of values and variables. Here are some of the common data types in Apex:
Primitive Data Types:
Integer: Represents whole numbers.
Long: Represents large integer values.
Double: Represents decimal numbers with a high degree of precision.
Decimal: Represents fixed-point decimal numbers.
Boolean: Represents true or false values.
Date: Represents a date without a time.
Time: Represents a time without a date.
Datetime: Represents a date and time.
String: Represents text or character data.
Collections:
List: Represents an ordered collection of elements.
Set: Represents an unordered collection of unique elements.
Map: Represents a collection of key-value pairs.
Custom Data Types:
Object: Represents custom objects and sObjects in Salesforce.
sObject: Represents a standard or custom object in Salesforce.
Enum: Represents a collection of constant values.
User-Defined Types:
Class: Allows you to create user-defined classes.
Interface: Defines a blueprint for a class to implement.
Enum: Allows you to define custom enumerated data types.