Master the concepts of Salesforce in just 45 days Click here to know more.
8
10
58
27
Premium Salesforce Weekend Batch Start From Tomorrow.
Ex: main() {
Double d = 5.2;
DateTime dt = new DateTime.now();
DateTime finalDate = dt -d ;
System.debug(dt);
System.debug(finalDate);
}
Note: Only in case of ‘+’ if X is a string and Y is a string or any other type of non-null argument then it concatenates Y to the end of X.
If X(boolean) and Y(boolean) are both false then X remains false otherwise X is assigned true.
If X(boolean) and Y(boolean) are both true then X remains true otherwise X is assigned false.
If a value of X equals Y, the expression evaluates to true otherwise the expression evaluates to false.
Note: Unlike java(==), in apex it compares object value equality not reference equality except for user-defined types..
Note: String comparison using(==) is case insensitive.
Note: ID comparison using == is case sensitive.
main()
{
Integer a[] = new Integer[5];
Integer b[] = new Integer[5];
for(Integer i=0; i<5; i++)
a[i]=i+1;
System.debug(a);
System.debug(b);
System.debug(a==b);
Note: Arrays(==) performs a deep check of all the values before returning its result. Likewise for collection and built-in apex objects.
Note: The comparison of any two values can never result in null though X and Y can be literal null.
Note: SOQL and SOSL use ‘=’ for their equality operator not ‘==’.
If X and Y reference the exact same location in memory, the expression evaluates to true otherwise false.
FirstClass fc = new FirstClass();
FirstClass fc2 = new FirstClass();
System.debug(if(fc===fc2));
If X and Y do not reference the exact same location in emory, the expression evaluates to true otherwise false.
Id i1 = “——”;
Id i2 = “——”;
System.debug(i1>i2);
< < Previous
Next > >
The batch is going to start shortly. Fill the form given below to Register yourself now.
Fill out the form and get consulted by our Salesforce experts.
Fill out the form to figure out to detemine the perfect Salesforce profile for yourself.
Fill the form below to get a demo of this course.
Fill out the form to get your Premium Salesforce Development Course
Online Salesforce Development Course is soon going to be launched. Please fill the form and we will notify you about the course.