Cloud Analogy
Karadi Path Education Company Interview Questions and Answers
Q1. How to remove leading whitespaces from a string in the Python
Python provides a built-in method to remove leading whitespaces from a string.
Use the lstrip() method to remove leading whitespaces from a string.
lstrip() method removes all whitespaces from the beginning of the string.
Example: string = ' Hello World' string.lstrip() Output: 'Hello World'
Q2. Write code to create pattern { star (*) pattern was given }
Code to create a star pattern
Use nested loops to print the pattern
The outer loop controls the number of rows
The inner loop controls the number of stars to print in each row
Use a combination of spaces and stars to create the pattern
Q3. How to overload constructor in Python?
Overloading constructor in Python allows creating multiple constructors with different parameters.
Define multiple constructors with different parameters
Use default values for optional parameters
Call the appropriate constructor based on the number and type of arguments passed
Q4. Write the code to reverse the string
Code to reverse a string
Use a loop to iterate through the string
Create a new string and add each character from the original string in reverse order
Return the new string
Q5. why we use apex programming language
Apex is used for building custom business logic and integrations on the Salesforce platform.
Apex is a strongly-typed, object-oriented programming language.
It allows developers to create custom code to extend Salesforce functionality.
Apex can be used to build triggers, controllers, and classes for custom business logic.
It can also be used to integrate Salesforce with external systems.
Apex code runs natively on the Salesforce platform, providing secure and scalable performance.
Q6. what is salesforce developer
Salesforce developer is a professional who develops and customizes applications on the Salesforce platform.
Salesforce developers use Apex and Visualforce to create custom applications and functionality
They work closely with stakeholders to understand business requirements and design solutions
They also integrate Salesforce with other systems and manage data within the platform
Examples of Salesforce developer roles include Application Developer, Integration Developer, and Light...read more
Q7. When we will face Attempt to de-refresh null object
Attempt to de-reference null object occurs when trying to access or manipulate a null object in Salesforce development.
Always check if an object is null before trying to access its properties or methods
Use safe navigation operator '?' to avoid null pointer exceptions
Example: Account acc = null; System.debug(acc.Name); // This will throw Attempt to de-reference null object error
Example: Account acc = null; System.debug(acc?.Name); // This will not throw an error
Q8. Write a code to reverse the string of your name.
Code to reverse a string of your name
Create a function that takes a string as input
Use built-in functions like reverse() or loop through the string to reverse it
Return the reversed string
Q9. Write a code to print pyramid pattern
Code to print pyramid pattern in Python
Use nested loops to print spaces and stars in each row
Increment the number of stars in each row to form the pyramid shape
Example: for a pyramid with 5 rows, the code would look like this:
for i in range(5):
print(' '*(5-i-1) + '*'*(2*i+1))
Top Salesforce Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month