Salesforce Trainee
Salesforce Trainee Interview Questions and Answers
Q1. Write a program to check if a string is a palindrome or not.
A program to check if a string is a palindrome or not.
A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward.
To check if a string is a palindrome, we can compare the characters from the beginning and end of the string.
If the characters match for all positions, the string is a palindrome.
We can ignore spaces, punctuation, and case sensitivity when checking for palindromes.
Q2. What is Salesforce, write a trigger, about lightning, clouds
Salesforce is a cloud-based CRM platform that helps businesses manage customer interactions and automate sales processes.
Salesforce is a customer relationship management (CRM) platform
Triggers are used to automate processes in Salesforce
Lightning is a user interface framework for building dynamic web applications
Salesforce offers various cloud services such as Sales Cloud, Service Cloud, Marketing Cloud, etc.
Salesforce Trainee Interview Questions and Answers for Freshers
Q3. What is the use of main function.
Main function is the entry point of a program. It is used to execute the code in the program.
Main function is required in every program written in C, C++, Java, etc.
It is the first function to be executed when the program starts.
It can take command line arguments.
It returns an integer value to the operating system.
Example: int main() { // code to be executed }
Q4. What is a constructor.
A constructor is a special method that is used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can be used to set initial values for object properties.
Constructors can be overloaded to accept different parameters.
Example: public class Person { public Person(String name) { this.name = name; } }
Q5. What are static variables
Static variables are variables that are associated with a class, not with an instance of the class.
Static variables are declared using the 'static' keyword.
They are initialized only once, at the start of the program.
They can be accessed without creating an instance of the class.
Static variables are shared among all instances of the class.
Examples include a counter variable to keep track of the number of instances created, or a constant value that is used throughout the progra...read more
Q6. Program to find Factorial of a number
Program to find factorial of a number
Use a loop to multiply the number with all the numbers below it
Handle the case when the number is 0 or 1 separately
Use recursion to find factorial of a number
Share interview questions and help millions of jobseekers 🌟
Salesforce Trainee Jobs
Interview Questions of Similar Designations
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month