public class DataTypesExample {
public Integer integerVariable;
public String stringVariable;
public List<String> stringList;
public Map<String, Integer> stringToIntegerMap;
public static void main() {
DataTypesExample example = new DataTypesExample();
example.integerVariable = 42;
example.stringVariable = 'Hello, World';
example.stringList = new List<String>{'Red', 'Green', 'Blue'};
example.stringToIntegerMap = new Map<String, Integer>{
'One' => 1,
'Two' => 2,
'Three' => 3
};
System.debug('Integer: ' + example.integerVariable);
System.debug('String: ' + example.stringVariable);
System.debug('List: ' + example.stringList);
System.debug('Map: ' + example.stringToIntegerMap);
}
}