Interview Preparation Questions
Interview Preparation Questions
Questions
1 What are objects the in OOP?
2 What is meant by the term OOPs?
3 What is the need for OOPs?
4 What is Class ?
5 What is Encapsulation ?
6 What is Inheritance?
7 Why Multiple Inheritance not supported for classes?
8 What is Abstraction ?
9 What is a constructor?
10 Types of Constructors
11 What is a method in Apex?
12 How Method is Declared?
13 What is the access specifier in apex ?
14 What are the various types of inheritance?
15 What is an interface?
16 What is Object Oriented Programming?
17 Differentiate between overloading and overriding.
18 What Is Apex?
19 What is an abstract class?
20 What is abstract method?
21 What do you understand by OOP?
22 Real time example of OOP
23 What are the limitations of OOPs?
24 What is the purpose of a default constructor?
25 What is the static variable?
26 Difference between method Overloading and Overriding.
27 What are the differences between abstract class and interface?
28 Can we create a object in apex?
29 Can we create a class in object?
30 Can we declared two method with same name ? with different param ?
31 Is the constructor inherited?
32 Can we call a method of a class without creating an object of a class?
33 Can we override the static methods?
34 Can we make constructors static?
35 Can we override the private methods ? If no then what is the reason
36 What is the final method ?
37 What is the final class ?
38 Can we declare a constructor as final?
39 What is the difference between abstraction and encapsulation?
40 Can there be an abstract method without an abstract class?
41 Can you use abstract and final both with a method?
42 Can you declare an interface method static?
43 Can the Interface be final?
44 Can we define private and protected modifiers for the members in interfaces?
45 Why we used Inheritance. What is the benefit of this.
46 Why we use Method Overloading
47 Why we use Method Overriding
48 What is the use of super keyword?
49 What is the use of this keyword?
50 Can private and final methods be overloaded?
51 What is the difference between non-static and static?
52 When should we use apex?
53 How does apex work?
54 What is Developer Console?
55 What are the tasks supported by developer Console?
56 What are the other IDE or code editors you use as a salesforce developer?
57 What are the different data types we have in salesforce?
58 What are primitive data types?
e developer?
SR No. Questions
1 What are Collections are supported in apex ?
2 Is it possible to write the set like that set<Account> ?
3 What is Collection in Salesforce?
4 When we should use Map over the list?
5 how to check whether a list is null or empty?
6 What is the different between list.Size() > 0 vs list != null vs list.IsEmpty()?
7 Will the set maintain insertion Order?
8 Will the list maintain insertion Order?
9 Can we sort the values in the set?
10 Which are Methods of Map ?
11 Which are Methods of Set?
12 Which are methods of List ?
13 What are some common use cases of list, set and map?
14 What do you think which is better List, Set or Map?
15 How will you find, whether an element exists in a List of size
16 How does Set and List differ
17 Is there any relation between map, set and list?
18 Can you write the syntax of initializing a map in one line?
19 Can we declare List<List<Integer>>, like this?
20 If yes to the above question how much level deep we can declare?
21 What are the features of the List collection?
22 What is the maximum size of the List collection?
23 What are the types of Data Types available in Salesforce?
24 What is the difference between Add and Set function in the List collection?
25 What is the difference between List and Set collection?
26 What happens when duplicate values are entered in Set collection?
SR No. Questions
1 How to Handle common Errors in Apex and Triggers?
2 What is Insufficient Privileges Error in Salesforce?
3 What is FIELD_CUSTOM_VALIDATION_EXCEPTION Error?
4 What is Too many SOQL queries: 101 error? and how to handle it?
5 What is System.LimitException: Too many query rows: 50001 in Apex and Triggers?
6 System.Query Exception: List has no rows for assignment to s-object?
7 What is Null Pointer exception and How to handle it?
8 What is Attempt to de-reference a null object error in Apex?
9 What is a MIXED-DML-OPERATION error and how to avoid?
10 Explain try catch finally and throw keyword in detail
11 How to create custom exception?
12 Why do we need to handle exception?
13 After any error in try block the remaining code gets executed?
14 Can we write multiple catch blocks?
15 If we write catch(Exception e) {} as first catch block then can we define other catch blocks
16 If yes to above question try it once, If no to above question justify your answer.
17 State some of the exceptions that you know also mention when these exceptions can occur.
18 Is it always necessary to use finally block?
19 Which is the exception that cannot be caught?
20 Mention some of the Apex best practices. Click here for answer
21 Best practices for Excception Handling. Click here for answer
22 What is Apex CPU time limit exceeded?
SR No. Questions
1 Differentiate between Salesforce Object Query Language and Salesforce Object Search Language.
2 Get name of accounts and related contacts
3 Count number of unique stage names from opportunities
4 Get the name of the single record for a given id
5 Get contact on asc order of account creation date
6 Get 10 names from account in ascending order starting from 4th name
7 Retrieve all the contact records where name contains ‘s’
8 Get the 5th highest amount from opportunity
9 What Are The Types of SOQL Statements in SalesForce?
10 Why do we need Dynamic SOQL?
11 What is Escape quote?
12 Governor Limits of SOQL and SOSL
13 How we can limit our SOQL result?
14 How to assign SOQL result to a Map?
15 What will be the data types of Map for the above question?
16 Can you explain the syntax of a basic SOQL query?
17 How do you select all fields from an object using SOQL?
18 Is it possible to use multiple where conditions in one SOQL statement? If yes, then how?
19 Which operator can be used to combine two or more criteria while writing a SOQL query?
20 Explain Parent to Child and Child to Parent queries
21 What is the maximum number of records that can be returned by a single SOQL query?
22 What happens if we exceed the limit for records in a single SOQL query?
23 What are some common errors that occur when running SOQL statements?
24 How do you perform SOQL queries on related objects?
25 What are the different types of relationship queries available in Salesforce?
26 What is the best tool to run SOQL queries?
27 What are some best practices to follow when using SOQL?
28 Can you explain what “sObjects” are in context with SOQL queries?
29 Is it possible to run SOQL statements in anonymous windows inside Salesforce? If yes, then how?
30 How do you write a basic query in Salesforce using SOQL and view the results?
31 What is an sObject variable?
32 Explain the use of for each loop to iterate SOQL result
33 for(Account acc : [SELECT Id, Name FROM Account]){} is this a valid syntax?
34 What does the ORDER BY clause do in SOQL?
35 How do you specify dynamic field names using SOQL?
36 Explain INCLUDES and EXCLUDES operator in SOQL
37 Give some example of like operator
38 Explain all the aggregate functions
39 Why we should use IN operator, Why can't you use OR operator in that case?
40 Get Accoount records having atleast one child contact
41 What is an sObject?
42 How to access sObjects fields?
bject Search Language.
s, then how?
SOQL query?
OQL query?
Yes