Final Class Object
Final Class Object
Arrays:
- Array is a continuous memory allocation which can store homogeneous type of data.
- Array values are stored up on index. Starts with 0
- To calculate the length of an array we use size()
------------
Classes: Classes are the blueprints for the Objects and using Classes we can create 1 or multiple
Objects.
Members of the Class:
Methods:
- Reusable code snippet
- Specific purpose
- Knows what comes through
- Knows what goes out
In Salesforce Apex, a method is a block of code that can be called multiple times from within a class
or interface. Methods are used to perform specific actions, such as validating data, processing logic,
or interacting with external systems.
Person p1 = new Person();
p1.printDemo('sss');
-------------
public class Person {
public String firstName;
public String lastName;
public Integer age;