Define the methods in batchable interface?

1 Answer

Answer :

Ans:

Start:

global Database.Querylocator start (Database.BatchableContext bc){}

Execute:

global void execute(Database.BatchableContext bc,List <p>){}

Finish:

global void finish(Database.BatchableContext bc) {}

Related questions

Description : What is Database.Batchable interface?

Last Answer : Ans: The class that implements this interface can be executed as a batch Apex job. 

Description : What is Database.State full interface?

Last Answer : Ans:To maintain variable value inside the Batch class, Database.Stateful is used. 

Description : Define the methods in batchable interface?

Last Answer : Start: global Database.Querylocator start (Database.BatchableContext bc){} Execute: global void execute(Database.BatchableContext bc,List ){} Finish: global void finish(Database.BatchableContext bc) {}

Description : When a BatchApexworker record is created?

Last Answer : Ans: For each 10,000 AsyncApexJob records, Apex creates one additional AsyncApexJob record of type BatchApexWorker for internal use.

Description : What is AsyncApexJob object?

Last Answer : Ans: AsyncApexJob is Represents an individual Apex sharing recalculation job. Use this object to query Apex batch jobs in your organization.

Description : What is Database.AllowCallouts?

Last Answer : Ans: To use a callout in batch Apex, you must specify Database.AllowsCallouts in the class definition. For example: global class SearchAndReplace implements Database.Batchable, Database.AllowsCallouts ... } Callouts include HTTP requests as well as methods defined with the webService keyword.

Description : How many batch jobs can be added to queue?

Last Answer : Ans: Queued counts toward the limit of 5. 

Description : How to track the details of the current running Batch using BatchableContext?

Last Answer : Ans: You can check the AsyncApexJob.Status using the JobId from the Database.BatchableContext. 

Description : What is the Database.BatchableContext?

Last Answer : Ans: BatchableContext Interface is Represents the parameter type of a batch job method and contains the batch job ID. This interface is implemented internally by Apex.

Description : What is the maximum size of the batch and minimum size of the batch ?

Last Answer : Ans: The default batch size is 200 records. min? max? 

Description : Batch is synchronous or Asynchronous operations?

Last Answer : Ans: Asynchronous operations. 

Description : How many callouts we can call in batch apex?

Last Answer : Ans: Batch executions are limited to one callout per execution.

Description : Can we call another batch apex from batch apex?

Last Answer : Ans: Yes you can call a batch apex from another batch apex .Either in start method or in finish method you can call other batch

Description : Can we call callouts from batch apex?

Last Answer : Ans: Yes we can call. 

Description : What is the scope of execute method?

Last Answer : Ans: The maximum value for the optional scope parameter is 2,000 

Description : How many times execute method is called?

Last Answer : Ans: Execute method is called for each batch of records. 

Description : What is the use of execute method? 

Last Answer : Ans: Contains or calls the main execution logic for the batch job. 

Description : What is the iterable?

Last Answer : Ans: If you use an iterable, the governor limit for the total number of records retrieved by SOQL queries is still enforced.

Description : What is the Database.QueryLocator?

Last Answer : Ans: If we use a Database.QueryLocator, the governor limit for the total number of records retrieved by SOQL queries is bypassed. (Default 50,000 It allow up to 50 million records). 

Description : What is purpose of start method in batch apex?

Last Answer : Ans: It collect the records or objects to be passed to the interface method execute.

Description : What is the need of batch apex?

Last Answer : Ans: By using Batch apex classes we can process the records in batches in asynchronously. 

Description : What are the transaction limitations in apex?

Last Answer : Ans: Each execution of a batch Apex job is considered a discrete transaction. For example, a batch Apex job that contains 1,000 records and is executed without the optional scope parameter from ... but the second fails, the database updates made in the first transaction are not rolled back.

Description : What are the soql limitations in apex?

Last Answer : Ans: Total number of records retrieved by SOQL queries-50,000 

Description : What is Database.Batchable interface?

Last Answer : The class that implements this interface can be executed as a batch Apex job.

Description : What si the difference between interface and abstractclass Select Answer:  1. interface contain only methods  2. we can't declare a variable for interface  3. interface contain only events  4. None  5. All

Last Answer : Ans : 2 The only Difference between Interface and Abstract class is we can declare a variable in abstract class but we can't declare in variable interface

Description : Why can’t you specify the accessibility modifier for methods inside the interface?

Last Answer : They all must be public, and are therefore public by default. 

Description : Why can’t you specify the accessibility modifier for methods inside the interface?

Last Answer : They all must be public, and are therefore public by default.

Description : Why can’t you specify the accessibility modifier for methods inside the interface? 

Last Answer : They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.

Description : Which of the following factor needs to be addressed while working with mobile applications in the cloud? A. Slow transmission over the connection B. Different methods of navigation through the interface C. Variable screen sizes and resolutions D. All of the above

Last Answer : All of the above

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true

Last Answer : C) i-true, ii-false

Description : When a program class implements an interface, it must provide behavior for A) two methods defined in that interface B) any methods in a class C) only certain methods in that interface D) all methods defined in that interface

Last Answer : D) all methods defined in that interface

Description : Define what is the difference between a class and an Interface?

Last Answer : 1. Abstract classes can have implementations for some of its members, but the interface can't have implementation for any of its members. 2. Interfaces cannot have fields whereas an ... 5. Abstract class members can have access modifiers whereas interface members cannot have access modifiers.

Description : Define what is an interface class?

Last Answer : It is an abstract class with public abstract methods all of which must be implemented in the inherited classes.

Description : Define what is the difference between Class And Interface?

Last Answer : Class is a logical representation of an object. It is a collection of data and related sub procedures with a definition. The interface is also a class containing methods which are not having any definitions. Class does not support multiple inheritances. But interface can support.

Description : The ___ protocols define how the applications interface with the lower layer protocol to send the data over the network. A. Application layer B. Transport layer C. Network layer D. Link layer

Last Answer : A. Application layer