My Training Bangalore My Training Bangalore Thu, 20 Dec 2018 04:11:30 +0000 en-US hourly 1 My Training Bangalore 32 32 CORE JAVA SYLLABUS Tue, 18 Dec 2018 08:20:36 +0000 Core Java” is Sun’s term, used to refer to Java SE, the standard edition and a set of related technologies, like the Java VM, CORBA, et cetera. This is mostly to differentiate from, say, Java ME or Java EE.Also note that they’re talking about a set of libraries rather than theprogramming language. Features of Core Java 1) Simple Java is easy to learn […]

The post CORE JAVA SYLLABUS appeared first on My Training Bangalore.


Features of Core Java

1) Simple



2) Object Oriented


3) Robust


4) Platform Independent



5) Secure


6) Multi Threading


7) Architectural Neutral


8) Portable


9) High Performance



Chapter 1: Introduction to Java programming

a) The Java Virtual Machine

A Java virtual machine (JVM) is a virtual machinethat enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required of a JVM implementation.

b) Variables and data types


Variables types : local variable, instance variable, static variable

c) Conditional and looping constructs

conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.

Looping Constructs (Controlling Programming Flow) The statements inside any program executes sequentially, lineby line. This flow of execution is called as sequential execution.This flow of execution can be controlled (for example: Execute aportion of a program only once, based on a condition.

d) Arrays

Java array is an object which contains elements of a similar data type. It is a data structure where we store similar elements. We can store only a fixed set of elements in a Java array. Array in java is index-based, the first element of the array is stored at the 0 index.

Chapter 2: Object-oriented programming with Java Classes and Objects

a) Fields and Methods

Fields and methods are alike in that they exist within classes and have a defined type. If a method returns no values, its type is set to void. The most important distinction between the two is that Java fields can hold information, while Java methods perform a task.

b) Constructors

Constructors in Java. A constructor is a special method that is used to initialize an object.Every class has a constructor,if we don’t explicitly declare a constructor for any java class the compiler builds a default constructor for that class. A constructor does not have any return type.

c) Overloading methods

Two or more methods can have same name inside the same class if they accept different arguments. This feature is known as method overloading.

Method overloading is achieved by either: changing the number of arguments. …

Method overloading is not possible by changing the return type of methods.

d) Garbage collection

Java garbage collection is the process by which Java programs perform automatic memory management. Java programs compile to bytecode that can be run on a Java Virtual Machine, or JVM for short. … The garbage collector finds these unused objects and deletes them to free up memory.

e) Nested classes


Chapter 3: Inheritance

a) Overriding methods


b) Polymorphism


c) Making methods and classes final

Writing Final Classes and Methods. You can declare some or all of a class’s methods final. You use the final keyword in a method declaration to indicate that the method cannot be overridden by subclasses. The Object class does this—a number of its methods are final

d) Abstract classes and methods


e) Interfaces

An interface in the Java programming language is an abstract type that is used to specify a behavior that classes must implement. They are similar to protocols. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations

Chapter 4: Exception handling with try-throw-catch-finally constructs

a) The Exception class


Chapter 5: The Object class

a) Cloning objects

Object clone() method only when your class has primitives and immutable variables. Note that this applies for with inheritance too. You will have to check all the classes you are extending till the Object level. You can also define copy constructor if your class mostly consists of mutable objects.

b) The JDK LinkedList class

 The LinkedList class also consists of various constructors and methods like other java collections. Constructors for Java LinkedList: … LinkedList(Collection C): Used to create a ordered list which contains all the elements of a specified collection, as returned by the collection’s iterator.

c) Strings

a string is an object that represents a sequence of characters. The java.lang.String class is used to create string object. There are two ways to create a String object: By string literal : Java String literal is created by using double quotes.

d) String conversions

Integer.toString(int i) is used to convert in the further direction, from an int to a Java String. If you’re concerned with converting a String to an Integer object, use the valueOf() method of the Integer class instead of the parseInt() method.

Chapter 6: Working with types: Wrapper classes

a) Enumeration interface

An object that implements the Enumeration interface generates a series of elements, one at a time. Successive calls to the nextElement method return successive elements of the series.

Chapter 7: Packages

a) Package access

A Java access modifier specifies which classes can access a given class and its fields, constructors and methods. … Classes, fields, constructors and methods can have one of four different Java access modifiers: private. default (package) protected.

b)  Documentation comments

Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer.

Chapter 8: Applets

a) Configuring applets

An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its disposal. An applet is a Java class that extends the java.applet.Applet class. A main() method is not invoked on an applet, and an applet class will not define main().

b) Applet capabilities and restrictions



An applet cannot load libraries or define native methods.


An applet cannot read certain system properties.



Chapter 9: Basics of AWT and Swing

a) Layout Managers

The LayoutManagers are used to arrange components in a particular manner. LayoutManager is an interface that is implemented by all the classes of layout managers. There are following classes that represents the layout managers: java.awt.BorderLayout.

b) Event Handling

Event Handling is the mechanism that controls the event and decides what should happen if an event occurs. This mechanism have the code which is known as event handler that is executed when an event occurs. Java Uses the Delegation Event Model to handle the events. … Java provide as with classes for source object.

c) The Action Listener interface

A button listener must implement the ActionListener interface. ActionListener is an interface (not a class) that contains a single method: … A class that implements the interface must contain an actionPerformed() method. The ActionEvent parameter is an Event object that represents an event (a button click).

d) Panels

The class Panel is the simplest container class. It provides space in which an application can attach any other component, including other panels. It uses FlowLayout as default layout manager.

e) Checkbox, etc.

Java AWT Checkbox. The Checkbox class is used to create a checkbox. It is used to turn an option on (true) or off (false). Clicking on a Checkbox changes its state from “on” to “off” or from “off” to “on”.

f) Dialogs and frames

When the frame is deiconified, its dependent Dialogs return to the screen. A swing JDialog class inherits this behavior from the AWT Dialog class. A Dialog can be modal. When a modal Dialog is visible, it blocks user input to all other windows in the program. JOptionPane creates JDialog s that are modal.

g) Using menus

Menus Java are a number of pull-down combo boxes (In Java called as Choice) placed at single place for easy selection by the user. To create menus, the java.awt package comes with mainly four classes – MenuBar, Menu, MenuItem and CheckboxMenuItem.

h) Using the adapter classes

Java Adapter Classes. Java adapter classes provide the default implementation of listener interfaces. If you inherit the adapter class, you will not be forced to provide the implementation of all the methods of listener interfaces. So it saves code.

i) Graphics

The Graphics class is the abstract super class for all graphics contexts which allow an application to draw onto components that can be realized on various devices, or onto off-screen images as well. A Graphics object encapsulates all state information required for the basic rendering operations that Java supports.

Chapter 10: Threads

a) Synchronization


Chapter 11: The I/O Package

a) InputStream and OutputStream classes

The InputStream is used to read data from a source and the OutputStream is used for writing data to a destination. Here is a hierarchy of classes to deal with Input and Output streams. The two important streams are FileInputStream and FileOutputStream,

b) Reader and Writer classes

The class specifies the API by which characters are written. Wherever input and output streams use bytes, readers and writers use Unicode characters. … The most important concrete subclasses of Reader and Writer are the InputStreamReader and the OutputStreamWriter classes.

Chapter 12: Basic concepts of networking

a) Working with URLs

The Network API makes it possible to work with URLs at the source code level by providing class URL (located in package Each URL object encapsulates a resource’s identifier with a protocol handler

b) Sockets

Java Socket Programming. A socket is one endpoint of a two-way communication link between two programs running on the network. Socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent.

Chapter 13: Database connectivity with JDBC


The post CORE JAVA SYLLABUS appeared first on My Training Bangalore.

]]> 0
Advanced Java Topics Tue, 18 Dec 2018 08:05:30 +0000 Advanced Java is the next advanced level concept of Java programming. … The advance java programming covers the Swings, Socket Programming, AWT, Thread Concepts as well as the Collection objects and classes. “Advanced Java” is nothing but specialization in domains such as web, networking, data base handling. Some OF the Important features of Advance Java Introduction to JSP – Java Server […]

The post Advanced Java Topics appeared first on My Training Bangalore.


Some OF the Important features of Advance Java

  1. Introduction to JSP – Java Server Pages or JSP technology allows us to combine the static HTML with the Java code which makes a webpage dynamic. To begin about JSP,
  • Introduction to Servlets -Servlet is a  Advance Java class that creates a dynamic content after processing the user request, which was sent from the web browser. To begin learning about Servlet, lifecycle, methods,
  • Servlet API Classes – To know about some of the very important classes like GenericServlet, ServletRequest, ServletResponse, ServletConfig, ServletContext,
  • Request Dispatching – To understand how to dispatch the request from one Servlet to another Servlet using theRequestDispatcher and other features, please read Request Dispatching
  • Session Management – To understand how to perform session management by URL rewriting, Cookies, HttpSessiontechniques withshort code examples ,
  • Filters – Using the feature of filter, we can perform many tasks within a web application such as – session validation, user authentication, restricting access to a particular web resource etc. To begin about Filters with easy code examples,
  • Listeners – Using the feature of Listener in Servlet, we can make a web application which responds to events taking place in a web application. To know more about Listeners,



 a) Introduction to Generics :

 The Generics Features was added to the Java with the release of Java 5.0. The Generics was the   long-waited enhancement which is added to the Java 5.0. The Generics allows to use the type or method operate on the objects of various types, mainly for the compile time type safety checking. Generics was introduced to make the coding more robust and less error prone. Through compile-time type safety checking it removes bugs from the Java code.

b) Examples of Generics

 In this section we will explain you how you can use the Generics while writing the Java Program? The introduction to the Generics is the major step in the Java Language. Generics can be used to define the generic classes and methods thus bringing the generic types in the Java Programming Language.

There is lot of potential in the Generics to bring the improvements in the type safety and the maintainability of the large scale project. This tutorial will teach you how to add the Generics to the Java code in classes and the methods. Here we are also discussing about the detailed syntax of the Generics and explain its use in the Java code.

c) Type Erasure

Generics concept is introduced in Java language to provide tighter type checks at compile time and to support generic programming. The way to implement generics, the Java compiler applies type erasure to: Replace all type parameters in generic types with their bounds or Object if the type parameters are unbounded.

 d) Type Boundaries

A data type is a classification mechanism whereby it can be identified that what kind of data is stored inside the variable, and what operations it supports. Java provides a richer set of primitive or basic or built-in data types than other languages like C and C++.

e) Wildcards

The question mark (?) is known as the wildcard in generic programming . It represents an unknown type. The wildcard can be used in a variety of situations such as the type of a parameter, field, or local variable; sometimes as a return type. Unlike arrays, different instantiations of a generic type are not compatible with each other, not even explicitly. This incompatibility may be softened by the wildcard if ? is used as an actual type parameter.

f) What is Generic Methods?


g) Strengths and Weaknesses of Generics :


i. Simple

Java was design to straightforward to use, write, compile, debug, and learn than alternative programming languages. Java is far less complicated than C++ as a result of Java uses automatic memory allocation and garbage collection.

ii. Object-Oriented

Permits you to form standard programs and reusable code.

iii. Platform-Independent

Ability to maneuver simply from one system to a different.

iv. Distributed

Designed to create distributed computing straightforward with the networking capability that’s inherently integrated into it.

v. Secure

The Java language focus on security, compiler, interpreter, and runtime surroundings were every develope.

Let’s Explore Features of Java Programming Language

vi. Allocation

Java has the feature of Stack Allocation System. It helps the information to keep and might restore simply.

vii. Multithreaded

The potential for a program to perform many tasks at the same time at intervals a program.


i. Performance

A lot of memory-consuming than natively compiled languages reminiscent of C or C++ and a bit slower.

ii. Look and Feel

The default look and feel of graphical user interface applications written in Java using the Swing toolkit are extremely completely different from native applications.

iii. Single Paradigm Language

Static imports were added in Java 5.0 the procedural paradigm is better accommodated than in earlier versions of Java.

h) Legacy Code

Legacy code refers to an application system source code type that is no longer supported. Legacy code can also refer to unsupported operating systems, hardware and formats. In most cases, legacy code is converted to a modern software language and platform.


a) Java Thread Model



b)Creating and Running Threads

To execute the run() method by a thread, pass an instance of MyClass to a Thread in its constructor (A constructor in Java is a block of code similar to a method that’s called when an instance of an object is created). Here is how that is done: Thread t1 = new Thread(new MyClass ()); t1.start();

c)Manipulating Thread State | Thread Synchronization in Java Example

In Java, thread scheduler can use the thread priorities in the form of integer value to each of its thread to determine the execution schedule of threads . Thread gets the ready-to-run state according to their priorities. The thread scheduler provides the CPU time to thread of highest priority during ready-to-run state. 

Sometimes, when two or more threads need shared resource, they need a proper mechanism to ensure that the resource will be used by only one thread at a time.

The mechanism we use to achieve this is known as thread synchronization.

The thread synchronization is achieved through the synchronized keyword. The statements which need to be synchronized should put into the synchronized block It is also known as critical section.

d)Thread Synchronization

In this section we will discuss about Synchronization in java. Since java is a multi-threaded language so, when two or more thread used a shared resources that lead to two kind of errors: thread interference and memory consistency error, to avoid this error you need to synchronized object,  that the resource will be used by one thread at a time and the process by which synchronization is achieved is called synchronization. Synchronized keyword in java create a critical section in which a lock is associated with the object . To enter the critical section a thread need to obtain the object lock

e)Volatile Fields vs. Synchronized Methods

volatile keyword in java is a field modifier, while synchronized modifies code blocks and methods. synchronized obtains and releases lock on monitor’s java volatile keyword doesn’t require that.

f )wait and notify

wait()-It tells the calling thread to give up the lock and go to sleep until some other thread enters the same monitor and calls notify().


notifyAll()-It wakes up all the threads that called wait() on the same object.

g) join and sleep


h) The Concurrency API

The API is located in package java.util.concurrent and contains many useful classes for handling concurrent programming. Since that time the Concurrency API has been enhanced with every new Java release and even Java 8 provides new classes and methods for dealing with concurrency.

i) Atomic Operations

An atomic operation is an operation which is performed as a single unit of work without the possibility of interference from other operations. The Java language specification guarantees that reading or writing a variable is an atomic operation(unless the variable is of type long or double )


a) The Reflection API

Reflection is an API which is used to examine or modify the behavior of methods, classes, interfaces at runtime. The required classes for reflection are provided under java.lang.reflect package.

b) Getting the implemented Interfaces

A Java class can implement multiple Java Interfaces. It is necessary that the class must implement all the methods declared in the interfaces. The interface allows sending a message to an object without concerning which classes it belongs. Class needs to provide functionality for the methods declared in the interface.

c) Retrieving the class name through Reflection API

Java Reflection is the process of analyzing and modifying all the capabilities of a class at runtime. Reflection API in Java is used to manipulate class and its members which include fields, methods, constructor, etc. at runtime

d) Finding out the superclass name of the Class

String superClass = a_class.getClass().getSuperclass().getName(); To get just the name and not the package name, use Class.getSimpleName() : String superClass = a_class.getClass().getSuperclass().getSimpleName(); However, a_class is already a Class instance so you might want to use a_class.getSuperclass() instead

e) Getting the method name used in the Application

this is a keyword in Java which is used as a reference to the object of the current class, with in an instance method or a constructor. Using this you can refer the members of a class such as constructors, variables and methods.

f) Finding out the object of the Class

You can use getClass() to get the java.lang.Class object that represents the type of the object. If you just want to know if an object is an instance of or extends a certain class, or implements a certain interface, you can use the instanceof keyword.

g) Finding out the class fields

A class variable (declared static ) is a location common to all instances. Each Java object is a distinct memory zone with some meta data (e.g. some reference to its class) and its own instance variables (perhaps inherited from a superclass).

h) Getting information about Constructor


i) No Argument Constructor Example

The default constructor is a no-args constructor that the Java compiler inserts on your behalf; it contains a default call to super(); (not supper() ) which is the default behavior. … If the class being declared is the primordial class Object, then the default constructor has an empty body.

j) Class Modifier Example

Java provides a number of non-access modifiers to achieve many other functionality. The static modifier for creating class methods and variables. The final modifier for finalizing the implementations of classes, methods, and variables. The abstract modifier for creating abstract classes and methods.

k) Calling ( Invoking ) Methods through Reflection

Invoking Methods. Reflection provides a means for invoking methods on a class. … Subsequent arguments are the method’s parameters. If the underlying method throws an exception, it will be wrapped by an java.lang.reflect.InvocationTargetException .

l) The Class<T> Class

In Java there’s a single metaclass: Class. Its instances (only one per type exists) are used to represent classes and interfaces, therefore the T in Class<T> refers to the type of the class or interface that the current instance of Class represents. This generally refers to generic type in java or generic classes.

m) The java.lang.reflect Package

The java.lang.reflect package contains the classes and interfaces that, along with java.lang.Class, comprise the Java Reflection API. This package is new as of Java 1.1. Figure 14-1 shows the class hierarchy. The Constructor, Field, and Method classes represent the constructors, fields, and methods of a class.

n) Reading Type Information

Most of this metadata is type information enumerating the base class, superinterfaces, fields, and methods of the class. Type information is used to make the dynamic linking of code more reliable by verifying at runtime that clients and servers share a common view of the classes they use to communicate.

o) Navigating Inheritance Trees

In Java, the inheritance mechanism allows to define a class hierarchy with all the classes. Without explicit inheritance, a class implicitly inherits from the Object class. This Object class is the root of the class hierarchy. Some classes can’t be inherited.

p) Dynamic Instantiation

An object can be dynamically associated with a class, we talk of dynamic instantiation of object. The dynamic instantiation of an object allows you to create an object at a given time and to free this object when it is no longer used. To instantiate an object, you must: Declare a dynamic object.

q) Dynamic Invocation

Generated bytecode often requires several actual JVM method invocations for one dynamic language method invocation. Reflection is widely used and contributes to performance degradation. Also, the many different execution paths make it impossible for the JVM’s just-in-time (JIT) compiler to apply optimizations.

r) Reflecting on Generics

The Generics Reflection Rule of Thumb. Using Java Generics typically falls into one of two different situations: Declaring a class/interface as being parameterizable. Using a parameterizable class.

s) Uses for Meta-Data

Essentially, JMI can be used to write tools in Java for manipulating UML models, which can be used in Model Driven Architecture and/or Model Driven Development. … Standardized mappings from the MOF modeling constructs to Java; Reflective APIs for generic discovery and navigation of metadata models and instances


a) What is Annotations in Java?

Annotations in computer programming languages provide data about a program that is not part of the program itself by decorating them. They does not impact directly to the operation of the code to which they annotate.

Annotations are mainly used for:

Information for the compiler: Compiler uses the annotations to detect errors or suppress warnings.

Compiler-time and deployment time processing: annotation information is processed by the annotation processor in order to produce new source code and other files.

Runtime processing: some annotations are scanned at runtime by using various techniques and open source libraries.

b) Annotation Quick Introduction

Annotations behave like metadata and provide data about a program that is not part of the program itself. They are used to associate program elements with the meta tags so that the compiler can generate interdependent code to support the annotated elements. Developing annotations helps in faster development of program. Multi-value annotations are used to pass the values to multiple data members.

c) Java Custom Annotation Example


d) Aspect-Oriented Programming and Java

An aspect is a common feature that’s typically scattered across methods, classes, object hierarchies, or even entire object models. It is behavior that looks and smells like it should have structure, but you can’t find a way to express this structure in code with traditional object-oriented techniques.

For example, metrics is one common aspect. To generate useful logs from your application, you have to (often liberally) sprinkle informative messages throughout your code. However, metrics is something that your class or object model really shouldn’t be concerned about. After all, metrics is irrelevant to your actual application: it doesn’t represent a customer or an account, and it doesn’t realize a business rule. It’s simply orthogonal.

In AOP, a feature like metrics is called a crosscutting concern, as it’s a behavior that “cuts” across multiple points in your object models, yet is distinctly different. As a development methodology, AOP recommends that you abstract and encapsulate crosscutting concerns.

e) The Annotations Model

The purpose of a Java annotation is simply to associate information with the annotated program element. Java annotations may be used as modifiers in any declaration, whether package, class (including enums), interface (including annotation types), field, method, formal parameter, constructor, or local variable

f) Annotation Types and Annotations

There are 3 categories of Annotations:-

1. Marker Annotations:

The only purpose is to mark a declaration. These annotations contain no members and do not consist any data. Thus, its presence as an annotation is sufficient. Since, marker interface contains no members, simply determining whether it is present or absent is sufficient. @Override is an example of Marker Annotation.

Example: – @TestAnnotation()

2. Single value Annotations:  

These annotations contain only one member and allow a shorthand form of specifying the value of the member. We only need to specify the value for that member when the annotation is applied and don’t need to specify the name of the member. However in order to use this shorthand, the name of the member must be value.

Example: – @TestAnnotation(“testing”);

3. Full Annotations:

These annotations consist of multiple data members/ name, value, pairs.

Example:- @TestAnnotation(owner=”Rahul”, value=”Class Geeks”)

g) Built-In Annotations

there are several that inform compilation:






These annotations generate or suppress compiler warnings and errors. Applying them consistently is often a good practice since adding them can prevent future programmer error.

h) Annotations vs. Descriptors (XML)

 A deployment descriptor is an XML file that describes how a Java EE application or module should be deployed. … The following types of deployment descriptors are associated with GlassFish Server: Java EE Standard Descriptors.


a) The OSI Reference Model

ISO stands for International organization of Standardization. This is called a model for Open System Interconnection (OSI) and is commonly known as OSI model. The ISO-OSI model is a seven layer architecture. It defines seven layers or levels in a complete communication system.

b) Network Protocols

The package provides support for the two common network protocols − TCP − TCP stands for Transmission Control Protocol, which allows for reliable communication between two applications. TCP is typically used over the Internet Protocol, which is referred to as TCP/IP.

c) Overview of Networking through JAVA

All the Java networking classes and interfaces use package. These classes and interfaces provide the functionality to develop system-independent network communication. TCP is a connection based protocol that provides a reliable flow of data between two devices.

d) Socket and ports


e) Server Sockets


f) URL in term of Java Network Programming

URL in term of Java Network Programming. A URL (Uniform Resource Locator) is the address of a resource on the Internet. In java network programming we can use URLs to connect and retrieve information over the Internet.

g) Datagram in network environment

The fact that datagram sockets are openly unreliable may lead you to think that they are something to avoid in network programming. … Java supports datagram socket programming through two classes: DatagramSocket and DatagramPacket. The DatagramSocket class provides an implementation for a basic datagram socket.

h) Networking in Java

Java Networking is a concept of connecting two or more computing devices together so that we can share resources. Java socket programming provides facility to share data between different computing devices.

i) The Socket Class

Class This class implements client sockets (also called just “sockets”). A socket is an endpoint for communication between two machines. The actual work of the socket is performed by an instance of the SocketImpl class.

j) The ServerSocket Class

ServerSocket Class Methods. The class is used by server applications to obtain a port and listen for client requests. Attempts to create a server socket bound to the specified port. An exception occurs if the port is already bound by another application.

k) Connecting Through URL Objects

Connection to the remote object represented by the URL is only initiated when the URLConnection.connect method is called. When you do this you are initializing a communication link between your Java program and the URL over the network.

l) Find Your Host Name/IP Address

Java program to find IP address of your computer. An IP(Internet Protocol) address is an identifier assigned to each computer and other device(e.g., router, mobile, etc) connected to a TCP/IP network that is used to locate and identify the node in communication with other nodes on the network.

m) How to retrieve URL information

Within your Java programs, you can create a URL object that represents a URL address. The URL object always refers to an absolute URL but can be constructed from an absolute URL, a relative URL, or from URL components.

n) Construct a DatagramPacket to receive data

DatagramPacket(buffer, buffer.length) for constructs a DatagramPacket for receiving packets of length length in more generic way. First of all create a class UDPReceiver and initialize a object buffer of byte[] array. After that we call the DatagramPacket

0) Echo ClientSocket

That means, a socket program written in Java language can communicate to a program written in non-Java (say C or C++) socket program. A server (program) runs on a specific computer and has a socket that is bound to a specific port. The server listens to the socket for a client to make a connection request (see Fig.

p) RMI Client And RMI Server Implementation

The RMI application comprises of the two separate programs, a server and a client. A typical server program creates some remote objects, makes references to these objects accessible, and waits for clients to invoke methods on these objects. The RMI application provides the mechanism by which the server and the client communicate and pass information back and forth. The RMI distributed application uses the RMI Registry to obtain a reference to a remote object. The server calls the registry to associate a name with a remote object. The client looks up the remote object by its name in the server?s registry and then invokes a method on it.

q) HTTP and Other TCP Servers

An Http Server is bound to an IP address and port number and listens for incoming requests and returns responses to clients. Simple http server is flexible to be added into complex projects for rendering Html elements or serving as a backend server, or even deployed in the client side to drive specific devices.

The server socket listens for incoming connections. A server creates a socket, binds the socket to an IP address and port number (for TCP and UDP), and then listens for incoming connections. When a client connects to the server, a new socket is created for communication with the client (TCP only).Jun 2, 2012

r) Datagram Clients and Servers


s) Non-Blocking Sockets

Non-blocking Socket APIs. The classes that support non-blocking socket communication in Java are as follows. A selectable channel for stream-oriented listening sockets. … An instance of this class is used to establish connection between the client and the server like the Socket class instance


a) Database Management System

Database Management System: The software which is used to manage database is called Database Management System (DBMS). For Example, MySQL, Oracle etc. are popular commercial DBMS used in different applications.

b) Relational Databases

A database is a means of storing information in such a way that information can be retrieved from it. In simplest terms, a relational database is one that presents information in tables with rows and columns.

c) SQL


d) Introduction to DDL (Creating and Managing Database Objects) and DML (Retrieving and Managing Data)

Data Definition Language (DDL) is a unique set of SQL commands that lets you manipulate the structure of the database. In this article, we will try to show how the JDBC DDL mechanism can be applied to a Java application.

e) Sequences

he sequence structure is built into Java. Unless directed otherwise, the computer executes Java statements one after the other in the order in which they’re written—that is, in sequence.

f) Stored Procedures

You can run Java stored procedures in the same way as PL/SQL stored procedures. Normally, a call to a Java stored procedure is a result of database manipulation, because it is usually the result of a trigger or SQL DML call.


a) JDBC Tutorials Home Page

JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database.

b) What is the JDBC API?


c) JDBC Drivers

There are 4 types of JDBC drivers:

JDBC-ODBC bridge driver.

Native-API driver (partially java driver)

Network Protocol driver (fully java driver)

Thin driver (fully java driver)

d) Making a Connection

When a Java application needs a database connection, one of the DriverManager.getConnection() methods is used to create a JDBC connection. The URL used is dependent upon the particular database and JDBC driver. It will always begin with the “jdbc:” protocol, but the rest is up to the particular vendor.

e) Handling SQLWarning



a) SQL Escape Syntax

A SQL Escape Sequences. Language features, such as outer joins and scalar function calls, are commonly implemented by database systCems. The syntax for these features is often database-specific, even when a standard syntax has been defined.

b) Using Prepared Statements

The JDBC Statement, CallableStatement, and PreparedStatement interfaces define the methods and properties that enable you to send SQL or PL/SQL commands and receive data from your database. They also define methods that help bridge data type differences between Java and SQL data types used in a database.

c) Using Callable Statements

Use the when you plan to use the SQL statements many times. The PreparedStatement interface accepts input parameters at runtime. Use the when you want to access the database stored procedures. The CallableStatement interface can also accept runtime input parameters.

d) Updatable Result Sets

A forward only updatable result set maintains a cursor which can only move in one direction (forward), and also update rows. Scrollable updatable result sets. A scrollable updatable result set maintains a cursor which can both scroll and update rows.

e) Transactions


f) Commits, Rollbacks, and Savepoints

Commit, Rollback and Savepoint SQL commands. Transaction Control Language(TCL) commands are used to manage transactions in the database. These are used to manage the changes made to the data in a table by DML statements.

g) Batch Processing (Many Examples)

Batch Processing in JDBC. Instead of executing a single query, we can execute a batch (group) of queries. It makes the performance fast. The java.sql.Statement and java.sql.PreparedStatement interfaces provide methods for batch processing.


a)  GUI and J2EE programming

GUI stands for Graphical User Interface, a term used not only in Java but in all programming languages that support the development of GUIs. … To make graphical user interfaces in Java, use either Swing (older applications) or JavaFX.

The Java 2 Platform Enterprise Edition or the J2EE provides platform-independent Java centric environment. It was developed by Sun Microsystems which is presently merged with Oracle and is mainly used for developing, deploying, designing and building web based enterprise applications online.


a) What are Design Patterns?

The Factory Design Pattern or Factory Method Design Pattern is one of the most used design patterns in Java. According to GoF, this pattern “defines an interface for creating an object, but let subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses”.

b) Singleton, Factory Method, Abstract Factory

The factory method is just a method, it can be overridden in a subclass, whereas the abstract factory is an object that has multiple factory methods on it. The Factory Method pattern uses inheritance and relies on a subclass to handle the desired object instantiation.

c) Adapter, Composite, Decorator

Structural Patterns: Adapter, Bridge, Composite, and Decorator. Structural patterns deal with the arrangement and relationship between the classes in the system. They focus on how classes and objects are composed so as to form larger and more complex structures.

d) Data Access Object (DAO)


The post Advanced Java Topics appeared first on My Training Bangalore.

]]> 0
Latest 101 Python Interview Questions and Answers Tue, 04 Dec 2018 11:38:04 +0000 The post Latest 101 Python Interview Questions and Answers appeared first on My Training Bangalore.

Python-interview-Question-Answers 10


Here are some of the latest Interview Questions and Answers for Python


2) What is PEP 8?

3) What is pickling and unpickling?

4) How Python is interpreted?

5) How memory is managed in Python?


7) What are Python decorators?
Answer: A Python decorator is a specific change that we make in Python syntax to alter functions easily.

8) What is the difference between list and tuple?

9) How are arguments passed by value or by reference?

10) What is Dict and List comprehensions are?
Answer: They are syntax constructions to ease the creation of a Dictionary or List based on existing iterable.



Answer: There are mutable and Immutable types of Pythons built in types Mutable built-in types
Immutable built-in types


12) What is namespace in Python?

13) What is lambda in Python?
Answer: It is a single expression anonymous function often used as inline function.

14) Why lambda forms in python does not have statements?

15) What is pass in Python?

16) In Python what are iterators?
Answer: In Python, iterators are used to iterate a group of elements, containers like list.

17) What is unittest in Python?

18) In Python what is slicing?

19) What are generators in Python?

20) What is docstring in Python?

Python-interview-Question-Answers 2

21) How can you copy an object in Python?

22) What is negative index in Python?

23) How you can convert a number to a string?

24) What is the difference between Xrange and range?

25) What is module and package in Python?


26) Mention what are the rules for local and global variables in Python?
Answer: Local variables: If a variable is assigned a new value anywhere within the function’s body, it’s assumed to be local.
Global variables: Those variables that are only referenced inside a function are implicitly global.

27) How can you share global variables across modules?
Answer: To share global variables across modules within a single program, create a special module. Import the config module in all modules of your application. The module will be available as a global variable across modules.

28) Explain how can you make a Python Script executable on Unix?
Answer: To make a Python Script executable on Unix, you need to do two things,
Script file’s mode must be executable and
the first line must begin with # ( #!/usr/local/bin/python)

29) Explain how to delete a file in Python?
Answer: By using a command os.remove (filename) or os.unlink(filename)

30) Explain how can you generate random numbers in Python?
Answer: To generate random numbers in Python, you need to import command as

import random


This returns a random floating point number in the range [0,1)

Python-interview-Question-Answers 3

31) Explain how can you access a module written in Python from C?
Answer: You can access a module written in Python from C by following method,

Module = =PyImport_ImportModule(“<modulename>”);

32) Mention the use of // operator in Python?
Answer: It is a Floor Divisionoperator , which is used for dividing two operands with the result as quotient showing only digits before the decimal point. For instance, 10//5 = 2 and 10.0//5.0 = 2.0.

33) Mention five benefits of using Python?
Answer: Python comprises of a huge standard library for most Internet platforms like Email, HTML, etc.
Python does not require explicit memory management as the interpreter itself allocates the memory to new variables and free them automatically
Provide easy readability due to use of square brackets
Easy-to-learn for beginners
Having the built-in data types saves programming time and effort from declaring variables

34) Mention the use of the split function in Python?
Answer: The use of the split function in Python is that it breaks a string into shorter strings using the defined separator. It gives a list of all words present in the string.

35) Explain what is Flask & its benefits?

Flask is part of the micro-framework. Which means it will have little to no dependencies on external libraries. It makes the framework light while there is little dependency to update and less security bugs.

36) Mention what is the difference between Django, Pyramid, and Flask?


Like Pyramid, Django can also used for larger applications. It includes an ORM.

37) Mention what is Flask-WTF and what are their features?
Answer: Flask-WTF offers simple integration with WTForms. Features include for Flask WTF are

Integration with wtforms
Secure form with csrf token
Global csrf protection
Internationalization integration
Recaptcha supporting
File upload that works with Flask Uploads

38) Explain what is the common way for the Flask script to work?
Answer: The common way for the flask script to work is

Either it should be the import path for your application
Or the path to a Python file

39) Explain how you can access sessions in Flask?
Answer: A session basically allows you to remember information from one request to another. In a flask, it uses a signed cookie so the user can look at the session contents and modify. The user can modify the session if only it has the secret key Flask.secret_key.

40) Is Flask an MVC model and if yes give an example showing MVC pattern for your application?
Answer: Basically, Flask is a minimalistic framework which behaves same as MVC framework. So MVC is a perfect fit for Flask, and the pattern for MVC we will consider for the following example

from flask import Flask

app = Flask(_name_)


Def hello():

return “Hello World” = True)

In this code your,

Configuration part will be
from flask import Flask

app = Flask(_name_)

View part will be

Def hello():

return “Hello World”

While you model or main part will be = True)

Python-interview-Question-Answers 4

41) Explain database connection in Python Flask?
Answer: Flask supports database powered application (RDBS). Such system requires creating a schema, which requires piping the shema.sql file into a sqlite3 command. So you need to install sqlite3 command in order to create or initiate the database in Flask.

Flask allows to request database in three ways

before_request() : They are called before a request and pass no arguments
after_request() : They are called after a request and pass the response that will be sent to the client
teardown_request(): They are called in situation when exception is raised, and response are not guaranteed. They are called after the response been constructed. They are not allowed to modify the request, and their values are ignored.

42) You are having multiple Memcache servers running Python, in which one of the memcacher server fails, and it has your data, will it ever try to get key data from that one failed server?
Answer: The data in the failed server won’t get removed, but there is a provision for auto-failure, which you can configure for multiple nodes. Fail-over can be triggered during any kind of socket or Memcached server level errors and not during normal client errors like adding an existing key, etc.

43) Explain how you can minimize the Memcached server outages in your Python Development?
Answer: When one instance fails, several of them goes down, this will put larger load on the database server when lost data is reloaded as client make a request. To avoid this, if your code has been written to minimize cache stampedes then it will leave a minimal impact
Another way is to bring up an instance of Memcached on a new machine using the lost machines IP address
Code is another option to minimize server outages as it gives you the liberty to change the Memcached server list with minimal work
Setting timeout value is another option that some Memcached clients implement for Memcached server outage. When your Memcached server goes down, the client will keep trying to send a request till the time-out limit is reached

44) Explain what is Dogpile effect? How can you prevent this effect?
Answer: Dogpile effect is referred to the event when cache expires, and websites are hit by the multiple requests made by the client at the same time. This effect can be prevented by using semaphore lock. In this system when value expires, first process acquires the lock and starts generating new value.

45) Explain how Memcached should not be used in your Python project?
Answer: Memcached common misuse is to use it as a data store, and not as a cache
Never use Memcached as the only source of the information you need to run your application. Data should always be available through another source as well
Memcached is just a key or value store and cannot perform query over the data or iterate over the contents to extract information
Memcached does not offer any form of security either in encryption or authentication

46) What Are The Rules For Local And Global Variables In Python?

47) How Do I Share Global Variables Across Modules?
import config
config.x = 1
import config
import mod
print config.x

48) How Do I Copy An Object In Python?
newdict = olddict.copy()
Sequences can be copied by slicing:
new_l = l[:]

49) How Can I Find The Methods Or Attributes Of An Object?

50) Is There An Equivalent Of C’s “?:” Ternary Operator?
Answer: No

Python-interview-Question-Answers 5

51) How Do I Convert A Number To A String?

52) What’s A Negative Index?

53) How Do I Apply A Method To A Sequence Of Objects?
Answer: Use a list comprehension:
result = [obj.method() for obj in List]

54) What Is A Class?

55) What Is A Method?
class C:
def meth (self, arg):
return arg*2 + self.attribute

56) What Is Self?

57) How Do I Call A Method Defined In A Base Class From A Derived Class That Overrides It?
class Derived(Base):
def meth (self):
super(Derived, self).meth()

58) How Do I Find The Current Module Name?
def main():
print ‘Running test…’

if __name__ == ‘__main__’:
__import__(‘x.y.z’) returns
For more realistic situations, you may have to do something like
m = __import__(s)
m = getattr(m, i)

59) Where Is The (,, Etc.) Source File?
Answer: There are (at least) three kinds of modules in Python:
1. modules written in Python (.py);
import sys
print sys.builtin_module_names

60) How Do I Delete A File?
Answer: Use os.remove(filename) or os.unlink(filename);

Python-interview-Question-Answers 6

61) How Do I Copy A File?
Answer: The shutil module contains a copyfile() function.

62) How Do I Run A Subprocess With Pipes Connected To Both Input And Output?
Answer : Use the popen2 module. For example:
import popen2
fromchild, tochild = popen2.popen2(“command”)
output = fromchild.readline()

63) How Do I Avoid Blocking In The Connect() Method Of A Socket?

64) Are There Any Interfaces To Database Packages In Python?
Answer : Yes.

65) How Do I Generate Random Numbers In Python?
Answer : The standard module random implements a random number generator. Usage is simple:
import random

66) Can I Create My Own Functions In C?

67) Can I Create My Own Functions In C++?

68) How Can I Execute Arbitrary Python Statements From C?

69) How Can I Evaluate An Arbitrary Python Expression From C?

70) How Do I Interface To C++ Objects From Python?

Python-interview-Question-Answers 7
71) How Do I Make Python Scripts Executable?




72) How Do I Debug An Extension?
br _PyImport_LoadDynamicModule
Then, when you run GDB:
$ gdb /local/bin/python
gdb) run
gdb) continue # repeat until your extension is loaded
gdb) finish # so that your extension is loaded
gdb) br myfunction.c:50
gdb) continue

73) Where Is Freeze For Windows?

74) Is A *.pyd File The Same As A Dll?
Answer: Yes .

75) How Do I Emulate Os.kill() In Windows?
Answer: Use win32api:
def kill(pid):
“””kill function for Win32″””
import win32api
handle = win32api.OpenProcess(1, 0, pid)
return (0 != win32api.TerminateProcess(handle, 0))

76) Explain About The Programming Language Python?

77) Explain About The Use Of Python For Web Programming?

78) State Some Programming Language Features Of Python?
Answer: Python supports many features and is used for cutting edge technology. Some of them are
2) Supports notable features such as classes and multiple inheritance.

79) How Is Python Interpreted?

80) Does Python Support Object Oriented Scripting?

Python-interview-Question-Answers 8

81) Describe About The Libraries Of Python?

82) State And Explain About Strings?

83) Explain About Classes In Strings?

84) What Is Tuple?

85) Explain And Statement About List?

86) Explain About The Dictionary Function In Python?

87) Explain About Indexing And Slicing Operation In Sequences?

88) Explain About Raising Error Exceptions?

89) What Is A Lambda Form?

90) Explain About Assert Statement?

Python-interview-Question-Answers 9

91) Explain About Pickling And Unpickling?

92) What Is The Difference Between A Tuple And A List?
list1 = [1,2,5,8,5,3,]
A tuple is defined in the following way
tup1 = (1,4,2,4,6,7,8)

93) If Given The First And Last Names Of Bunch Of Employees How Would You Store It And What Datatype?
Answer: Either a dictionary or just a list with first and last names included in an element.

94) How Do We Write A Function In Python?
Answer: We can create a Python function in the following manner.




95) What Is A Function Call Or A Callable Object In Python?

96) What Is The Return Keyword Used For In Python?
Answer: The purpose of a function is to receive the inputs and return some output.


97) What Is “Call By Value” In Python?


98) What Is “Call By Reference” In Python?
Answer: We use both “call-by-reference” and “pass-by-reference” interchangeably. When we pass an argument by reference, then it is available as an implicit reference to the function, rather than a simple copy. In such a case, any modification to the argument will also be visible to the caller.This scheme also has an advantage of bringing more time and space efficiency because it leaves the need of creating local copies.


99) What Is The Return Value Of The Trunc() Function?

100) Is It Mandatory For A Python Function To Return A Value?

101) Write a Python program to count the number of lines in a text file.
Answer: def file_lengthy(fname):
with open(fname) as f:
for i, l in enumerate(f):
return i + 1
print(“Number of lines in the file: “,file_lengthy(“test.txt”))


]]> 0
Latest 101 DevOps Interview Questions and Answers Wed, 28 Nov 2018 11:14:41 +0000 The post Latest 101 DevOps Interview Questions and Answers appeared first on My Training Bangalore.

DevOps-Interview -Questions- and- Answers


Here are some important interview questions on DevOps:

1. What is DevOps?
Answer :
It is a newly emerging term in IT field, which is nothing but a practice that emphasizes the collaboration and communication of both software developers and other information technology (IT) professionals. It focuses on delivering software product faster and lowering the failure rate of releases.

2. Name the popular scripting language of DevOps?
Answer:  Python

3. Discuss your experience building bridges between IT Ops, QA and development?

4.What types of testing are needed?

5. Which scripting languages do you think are most important for a DevOps engineer?

6. How do you expect you would be required to multitask as a DevOps professional?
Answer : Focus attention on bridging communication gaps between Development and Operations teams.




8. What’s a PTR in DNS?
Answer : Pointer records are used to map a network interface (IP) to a hostname. These are primarily used for reverse DNS. Reverse DNS is setup very similar to how normal (forward) DNS is setup. When you delegate the DNS forward, the owner of the domain tells the registrar to let your domain use specific name servers.

9. Describe two-factor authentication?

10. Which are the best DevOps instruments?
Answer : The most popular DevOps tools are mentioned below:

Git : Version Control System tool
Jenkins : Continuous Integration tool
Selenium : Continuous Testing tool
Puppet, Chef, Ansible : Configuration Management and Deployment tools
Nagios : Continuous Monitoring tool
Docker : Containerization tool

DevOps -Interview -Questions -and -Answers- tools

11. What are your desires from a career viewpoint of DevOps?
Answer : To be included within the conclusion to end delivery process and the foremost vital perspective of making a difference to move forward the method so as to empower the advancement and operations groups to work together and get it each other’s point of view

12. Clarify a few of the measurements that were taken after for DevOps success.
Answer : A few of the cases that may be specified are as follows:
The first and most important factor is the speed of delivery which means time taken for any work item to get into the production environment.
Next would be the deployment and how much time it would take once this process is automated.

It is almost necessary to track how many defects are found in different environments with respect to the PRODUCTION environment. This is very important in considering the features that need to be released faster. Use of Agile methodologies helps a lot and the prime goal is to reduce PRODUCTION level defects.

Normally deployments do not fail but it is very important to keep a track on this aspect and have a mechanism to roll back to the previous stable version.
In any DevOps implementation, unit testing is the key as well as functional testing. Based on the code changes done, often we need to look at whether these test break and to what extent. It is imperative that the automated test is robust enough to sustain any code changes.

It is very important to measure the actual or the average time that it takes to recover in case of a failure in the PRODUCTION environment. This is termed as Mean Time To Recover (MTTR) and it should be short. This also means that one needs to have proper monitoring tools to keep the recovery time short.

Performance of the application is another key metric which should be monitored especially after any deployments are done.

A very important factor for success is the number of bugs being reported by the customers which primarily depends on the quality of the application.

13. Have you been included in DevOps execution within the cloud? On the off chance that yes which cloud computing stage?
Answer : Examples of popular Cloud Computing Platforms:

AWS – Amazon Web Services
Microsoft Azure
Google Cloud

14. Explain the typical roles involved in DevOps.
Answer : DevOps Architect – The leader who is responsible for the entire DevOps process.
DevOps Engineer – The person should be experienced with Agile, SCM or Version Control, CI /CD and setting up automation tools for the same, Infrastructure automation and Database management skills. Any developer who has skills in coding or scripting and has the acumen to get into deployment or system admin can qualify for the role of a DevOps engineer.

15. Which scripting tools are used in DevOps?
Answer : Python, Ruby

Answer : Configuration management consists of practices and the various tools involved to automate the delivery and infrastructure operations. It is all about keeping the server ready (E.g. Installing system packages, network configuration settings) for application deployment once the application is developed.

So the Ops or the system admin needs to ensure parity in different environments (Dev, QA, PROD etc…) by provisioning the systems.


17. Explain a few prerequisites that are useful for DevOps implementation.
Answer : Typically the pre-requisites would include:

Commitment at the senior level in the organization.
Need for change to be communicated across the organization.
Version control software.
Automated tools for compliance to process.
Automated Testing
Automated Deployment

18. What are the key components of DevOps?
Answer : Continuous Integration
Continuous Testing
Continuous Delivery
Continuous Monitoring

19. Explain Continuous Integration.
Answer : Continuous Integration may be a exceptionally critical component of the Spry handle. Ordinarily designers work on highlights or client stories inside a sprint and commit their changes to the adaptation control repository.

Once the code is committed, at that point the whole work of designers is well coordinates and the construct is performed on a standard premise based on each check-in or plan. Subsequently, Nonstop Integration as a hone forces the engineer to coordinated their changes with the others so as to induce an early criticism.

20. Explain Continuous Delivery.
Answer : Continuous Delivery is an extension of Continuous Integration which primarily helps to get the features which the developers are developing out to the end users as soon as possible. During this process, it goes through various stages of QA, Staging etc., and then for delivery to the PRODUCTION system.

DevOps -Interview -Questions -and- Answers

21. Explain Continuous Testing.
Answer : From the above goal of Continuous Integration which is to get the application out to end users are primarily enabling continuous delivery. This cannot be completed without a sufficient amount of unit testing and automation testing.

Hence, we need to validate that the code produced and integrated with all the developers who perform as required.

22. Explain Continuous Monitoring.
Answer : As the application is developed and deployed, we do need to monitor its performance. Monitoring is also very important as it might help to uncover the defects which might not have been detected earlier

23.What is Extreme Programming (XP)?
Answer : Extreme Programming commonly referred to as XP is one of the most popular agile methodologies, which executes software development. XP rules are designed to focus more on customer satisfaction. It empowers developers to respond confidently to requirement changes through smaller iterations. XP emphasizes teamwork as managers, customers and developers work as equal partners in a collaborative team. Most of the companies use XP in their DevOps Journey.

24. What is Pair Programming?
Answer : Pair programming is one of the engineering practices of Extreme Programming rules. In this practice two programmers work on one computer, on the same design/algorithm/code/test.

One programmer acting as a “driver”, and the other acting as an “observer” who continuously watches/monitors to identify problems. Both roles can be exchanged at any point of time without any handoff.

25. What are the advantages of Pair Programming?
Answer : Pair Programming helps in raising discussions from two different points of view, which in turn help in increased understanding of code/algorithm/design/test.

26. What is Test Driven Development (TDD)?
Answer : Test Driven Development is one of the core agile and DevOps practices, which is more helpful in quick iterations and continuous integrations. In this method, test cases become the key to development process. This method ensures that problems are identified quickly, which helps manage risk elegantly.

TDD is a practice where you write code to address a failing test case. It is not only considered as a testing methodology, but also as a design and development methodology.

TDD starts with taking customer requirements, writing test cases and running the code against test cases. Test Cases fail as there is no code to address the test scenario; then, you write a simple code to PASS the test case.

27. What are the advantages of Test Driven Development?
Answer : As TDD first starts with the test case, the quality of code is increased as there will be one or more test cases for all the functionalities.

Refactoring code can be done confidently.

Eventually, the complete code in your application is well tested; since, it is constructed to address all the test cases.

Code turns more modular and flexible as developer is addressing all the test cases by coding in smaller units.

Note: TDD is only as good as its tests. If the tests are not reflecting the requirements, code cannot reflect the requirements.

To know more about Test Driven Development, you can refer to-

‘Test Driven Development: A Practical GUIDE – David Astels.’

28. What is a build?
Answer : Build is a process in which the source code is put together to verify whether it works as a single unit. In the process of build creation or generation, the source code will undergo compilation, testing, inspection and deployment. Usually, build generation process is completely automated in a way that a single command does everything.

29. What is Continuous Integration?
Answer : Continuous delivery is an important aspect to be understood when it comes to DevOps. On the path to Continuous delivery, Continuous Integration is a critical step. Continuous Integration defines when an automated build has to be generated. CI is one of the software development practices where member of the team frequently integrates their code, which then undergoes build generation process verifying the code written by individuals. Generally, each member will integrate his/her code once in a day. Each integration is verified and tested as part of build generation process.

Developer commits his changes

CI server polls Version Control repository every few minutes for changes.

CI server picks up changes and kicks off the build script.

Build scripts run and CI server generates a feedback based on the output of build script.

Feedback is checked to ensure that the build has run successfully; if not, the developer addresses the issue.

CI server keeps polling the Version Control Repository for more changes.

30. What are the benefits of Continuous Integration?
Answer : Software is deployable at any time. Having an immediate feedback mechanism helps the developers to quickly act if there are any issues.

Software quality increases as defects are prevented from being integrated.

Due to automated inspection and testing, software health can be tracked easily.

Results of the builds are published, which highlight the test cases that have failed.

Accountability of code is always recorded

DevOps -Interview -Questions -and- Answers

31. What are Design Patterns?
Answer : In simple terms, Design Patterns are the solution to problems faced by developers- they represent the best practices that are used by developers. Design Patterns help an inexperienced developer to learn easily and quickly. Design Patterns have standard terminologies addressing specific scenario.

There are mainly 3 types of Design Patterns:

Creational: addresses design problems.

Structural: simplifies relationships between objects.

Behavioral: simplifies how objects interact with each other.

32. What is Component Based Development?
Answer : In CBD approach; unlike traditional way of development, developers look for existing well defined, tested and verified components to compose and assemble them to a product, instead of developing it from scratch.

33. What is Continuous Deployment?
Answer : Continuous Deployment is majorly about instrumenting the most important steps within the project life-cycle when moving code from quality assurance step to production environment. Continuous Deployment is a critical capability to enable in the continuous delivery pipeline. There are several patterns that enable the nature of Continuous DevOps deployment.

34. What is Blue/Green Deployment Pattern?
Answer : Blue/Green Deployment pattern addresses one of the most important challenges faced by automatic deployments; i.e., the cutover from final stage of testing to live production. Ensuring this cutover happens quickly is the best way to reduce system downtime.

In Blue/Green Deployment approach, the team first ensures two identical production environments; but, only one among them is LIVE at any given point of time.

The LIVE environment is considered as Blue environment, and as the team prepares the next release of their software, they conduct their final stage of testing; considering it as Green environment. Once the team completes their final round of testing, they utilize some sort of tools which enable the user requests directly to the new Green environment. The Blue environment is considered as idle. The basic idea here is to easily switch between the environments.

35. hat are the Advantages of Blue/Green Deployment Pattern?
Answer :
A stand-by production node is always running.

Allows rollback testing with every release.

Rollback option is always available.

36. What are the Disadvantages of Blue/Green Deployment Pattern?
Answer :
Cost of maintaining 2 production environments.

Databases are a challenge that may require refactoring.

37. What is Canary Release?
Answer : Canary release is a pattern that reduces the risk of introducing a new version of software into production; this is done by making it available in a controlled manner to a subset of users before making it available to the entire user set.

In this pattern, the team deploys the new version only to a subset of the infrastructure, where there are no user request routed. Once the team is happy with the performance tests, they start routing a selected group of users to the application. As and when they feel confident, the company can release more servers as the team also routes more user requests.

38.What are the Advantages of Canary Release?
Answer :
Slow Ramp-up/down helps in monitoring/metrics.

Ability to do capacity testing.

Very safe rollback strategy.

39.What are the Disadvantages of Canary Release?
Answer :
Managing more than one software at a time.

Hard to work on distributed software.

40. What is the importance of Continuous Testing?
Answer : Continuous Testing actually means testing earlier across the software development life cycle by enabling ongoing testing and verification of the code; so that it ensures the code actually functions and performs as designed.

DevOps -Interview -Questions -and- Answers

41. What is Functional Testing and Non-functional Testing?
Answer : Functional Testing mainly targets the business goals as a way of ensuring that, within the code design and features, the product meets the customer’s business requirements.

On the other hand, non-functional testing focuses on performance, security, compatibility, usability, user experience, resource utilization, etc.

42. What are the foundational pillars of DevOps Testing?
Answer : The primary pillars of DevOps testing are:

Embrace testing early and ensure production readiness at all times.

Utilize proven technologies and patterns.

Apply appropriate rigor.

43. What is white box and black box testing?
Answer : Black box testing is where the tester does not know anything about internal structures of the application. On the other hand, box testing is where the tester knows about the structure and designs of the product.

White box testing is done at the unit and component level of testing; whereas, black box testing is done at the system and acceptance level of testing.

White box testing essentially needs some programming languages; whereas, black box testing may or may not need any programming skills.

44. What are the types of testing frameworks available in the market?
Answer : There are four types of testing frameworks available in the market. They are-

Modular Testing Frameworks: Aligns itself closely to the module structure of the application that is targeted for testing. Individual modules have their own test scripts and can be built hierarchically into larger and larger sets.
Advantage: It is very easy and quick going.

Disadvantage: Data gets embedded in test scripts, which in turn makes it tough to maintain.

Data driven Testing Frameworks: Test case logic is defined in the test scripts and input test data is kept outside of the test scripts. Test data can be in Excel files, CSV, JSON, etc. When test suite is run, the test data is loaded into variables in the test scripts.
Advantage: Requires less number of test scripts over modular framework.

Disadvantage: There still exists tight coupling between data and scripts.

Keyword Driven Testing Frameworks: It requires development of keywords and test data tables independent of test automation tool used to execute. Tests can be designed with or without the application.
Advantage: More flexible as both Data and Keywords can be reused across the scripts.

Disadvantage: Flexibility comes at the cost of complexity.

Hybrid Testing Frameworks: Tends to take the best of the other frameworks mentioned above and combines to a structured framework.
Advantage: Incorporates all the testing framework approaches.

Disadvantage: Very complex.

45. Name some automation testing frameworks you know.
Answer : Selenium, QTP, Appium, IBM Rational Functional Tester, Robot Framework, Cucumber, Nose, etc.

46. What is Resilience Test?
Answer : Tests that ensure recovery without data and functionality loss after a failure are called Resiliency tests. Here are the examples of Resilience test tools.

Hystrix: An open source tool, which has latency and fault tolerance libraries, designed to isolate points of access to remote systems and services.

Chaos Monkey: Developed by Netflix to randomly disable parts of the system and simulate production failures.

47. What is Configuration Management?
Answer : The process of storing, modifying, assessing and identifying all the artifacts of a project and understanding their interconnectedness is called Configuration Management. Configuration Management strategy is key for any project because it is the plan that outlines how you will manage the changes within your project. Configuration Management is synonymous with Version Control.

48. What is Version Control?
Answer : Version Control is an application that keeps track of different versions of your project as well as its artifacts and components. Storing files on USB drives is not version control. People think that version control is only for code, but its not. Every single artifact that is related to your project- source code, deployment scripts, test scripts, database scripts, documentation, libraries and configuration files, etc., are included.

There are two types of Version Control Systems:

Centralized Version Control System

Distributed Version Control System

49. What do you know about Git?
Answer : Git is a distributed version control system, it plays an important role in achieving DevOps. Git is a free software, distributed under the terms of GNU General Public License V2.0.


Git is a free and open source software.

There is no single point of failure.

No need of high end servers.

Git has the hash key mechanism to authenticate users.

Easy and Fast

As there are multiple copies of the code, probability of losing data is very less.

50.What is git stash?
Answer : Let’s suppose, a user is working on one of the features and suddenly a customer escalates an issue. User may have to keep his work aside and resolve the customer’s issue as a high priority. User cannot commit his partial code and cannot throw away his changes; in such cases git provides a solution with stash operation. Git stash operation moves all the modified files, stages, changes and pushes them onto a stack of unfinished changes that a user can get back any time.

$] git stash
To see the list of stash
$] git stash list
To get back the stashed files to current working directory
$] git stash pop

DevOps -Interview -Questions -and- Answers

51. What is git rebase?
Answer : After creating a personal branch and adding and modifying files; what if the master branch is updated and your branch becomes stale? In such scenarios, one can use git rebase. Git rebase command e will replay the changes made in your local branch at the tip of master, allowing conflicts to be resolved in the process.

52. What is git stash drop?
Answer : In order to remove stashed items, git stash drop command is used. By default this command deletes the last stashed items. We can also delete a particular stash item. Git stash list command lists all the stashed items. We can select the stash item to be removed and pass its name to stash drop command.

53. How do you create a new repository in git?
Answer : Create a project directory and run “git init” under that directory. It creates .git directory in the project directory.

54. How can one know the branches that are already merged into the master branch?
Answer :
git branch –merged master lists branches merged into master.

git branch –no-merged lists branches that have not been merged.

55. What Is Amazon Web Services In Devops?

56. What Is The Role Of A Devops Engineer?
Answer : There’s no formal career track for becoming a DevOps engineer. They are either developers who get interested in deployment and network operations, or sysadmin who have a passion for scripting and coding, and move into the development side where they can improve the planning of test and deployment.

57. What Is Devops With Cloud Computing?
Answer : Inseparable development and operations practices are universally relevant. Cloud computing, agile development, and DevOps are interlocking parts of a strategy for transforming IT into a business adaptability enabler. If cloud is an instrument, then DevOps is the musician that plays it.

58. What Is Devops Tooling By Aws?

59. How Do You Handle Continuous Integration And Continuous Delivery In Aws Devops?
AnswerANS : The AWS Developer Tools help you securely store and version your application’s source code and automatically build, test, and deploy your application to AWS or your on-premises environment.
Start with AWS Code Pipeline to build a continuous integration or continuous delivery workflow that uses AWS Code Build, AWS Code Deploy, and other tools, or use each service separately.

60. What Is Aws Code Pipeline In Aws Devops?
Answer : AWS Code Pipeline is a continuous integration and continuous delivery service for fast and reliable application and infrastructure updates. Code Pipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define. This enables you to rapidly and reliably deliver features and updates.

DevOps -Interview -Questions -and- Answers (2)

61. What Is Aws Code Build In Aws Devops?
Answer : AWS Code Build is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy. With Code Build, you don’t need to provision, manage, and scale your own build servers. Code Build scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue.

62. What Is Aws Code Deploy In Aws Devops?
Answer : AWS Code Deploy automates code deployments to any instance, including Amazon EC2 instances and on-premises servers. AWS Code Deploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications.

63. What Is Aws Code Star In Aws Devops?
Answer : AWS Code Star enables you to quickly develop, build, and deploy applications on AWS. AWS Code Star provides a unified user interface, enabling you to easily manage your software development activities in one place. With AWS Code Star, you can set up your entire continuous delivery tool chain in minutes, allowing you to start releasing code faster.

64. How Instacart Uses Aws Devops?
Answer : Instacart uses AWS Code Deploy to automate deployments for all of its front-end and back-end services. Using AWS Code Deploy has enabled Instacart developers to focus on their product and worry less about deployment operations.

65. How Lulu Lemon Athletic Uses Aws Devops?
Answer : Lulu lemon athletic uses a variety of AWS services to engineer a fully automated, continuous integration and delivery system. Lulu lemon deploys artifacts distributed via Amazon S3 using AWS Code Pipeline. From this stage, the artifacts are deployed to AWS Elastic Beanstalk.

66. What Is Amazon Elastic Container Service In Aws Devops?

67. What Is Aws Lambda In Aws Devops?

68. What Are Aws Developer Tools?

Together, these services help you securely store and version control your application’s source code and automatically build, test, and deploy your application to AWS or your on-premises environment. You can use AWS Code Pipeline to orchestrate an end-to-end software release workflow using these services and third-party tools or integrate each service independently with your existing tools.

69. What Is Code Commit In Aws Devops?
Answer : AWS Code Commit is a fully-managed source control service that makes it easy for companies to host secure and highly scalable private Git repositories. Code Commit eliminates the need to operate your own source control system or worry about scaling its infrastructure. You can use Code Commit to securely store anything from source code to binaries, and it works seamlessly with your existing Git tools.

70. What Are The Benefits Of Aws Code Build In Aws Devops?

Code Build scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue. You can get started quickly by using prepackaged build environments, or you can create custom build environments that use your own build tools. With Code Build, you are charged by the minute for the computer resources you use.

AWS Code Build Benefits:

Fully Managed Build Service AWS Code Build eliminates the need to set up, patch, update, and manage your own build servers and software. There is no software to install or manage.
Continuous Scaling – AWS Code Build scales automatically to meet your build volume. It immediately processes each build you submit and can run separate builds concurrently, which means your builds are not left waiting in a queue.
Pay as You Go – With AWS Code Build, you are charged based on the number of minutes it takes to complete your build.
Extensible – You can bring your own build tools and programming runtimes to use with AWS Code Build by creating customized build environments in addition to the prepackaged build tools and runtimes supported by Code Build.
Enables Continuous Integration and Delivery – AWS Code Build belongs to a family of AWS Code Services, which you can use to create complete, automated software release workflows for continuous integration and delivery (CI/CD). You can also integrate Code Build into your existing CI/CD workflow.
Secure – With AWS Code Build, your build artifacts are encrypted with customer-specific keys that are managed by the AWS Key Management Service (KMS). Code Build is integrated with AWS Identity and Access Management (IAM), so you can assign user-specific permissions to your build projects.

DevOps -Interview -Questions -and- Answers

71. What Is Amazon S3 In Aws Devops?

72. What Is Amazon Rds In Aws Devops?

73. What Is Amazon Quick Sight In Aws Devops?

74. What Is Aws Iot In Aws Devops?

75. What Are The Benefits Of Aws Code Deploy In Aws Devops?
Answer : AWS Code Deploy is a service that automates software deployments to a variety of computer services including Amazon EC2, AWS Lambda, and instances running on-premises.


AWS Code Deploy Benefits:

Automated Deployments – AWS Code Deploy fully automates your software deployments, allowing you to deploy reliably and rapidly. You can consistently deploy your application across your development, test, and production environments whether deploying to Amazon EC2, AWS Lambda, or instances running on-premises. The service scales with your infrastructure so you can deploy to one Lambda function or thousands of EC2 instances.
Minimize Downtime – AWS Code Deploy helps maximize your application availability during the software deployment process. It introduces changes incrementally and tracks application health according to configurable rules. Software deployments can easily be stopped and rolled back if there are errors.
Centralized Control – AWS Code Deploy allows you to easily launch and track the status of your application deployments through the AWS Management Console or the AWS CLI. Code Deploy gives you a detailed report allowing you to view when and to where each application revision was deployed.
Easy To Adopt – AWS Code Deploy is platform and language agnostic, works with any application, and provides the same experience whether you’re deploying to Amazon EC2 or AWS Lambda. You can easily reuse your existing setup code. Code Deploy can also integrate with your existing software release process or continuous delivery tool chain (e.g., AWS Code Pipeline, GitHub, and Jenkins).

76. What Is Vpc?

So basically you can say that Amazon VPC is the networking layer for AWS Infrastructure.

77. Describe three DevOps anti-patterns

organization — from IT executives to project managers to members of the security and hardware
provisioning teams — embrace and employ DevOps practices.

evaluate success and identify failures.

78. Name three important DevOps KPIs.
Answer : There are many KPIs that can be used to measure DevOps success. Three of the most common DevOps
KPIs are:
mean time to failure recovery
• deployment frequency
• percentage of failed deployments

Answer : The CAMS acronym stands for culture, automation, measurement and sharing.

80. Is a culture change a requirement or a result of doing DevOps?
DevOps tools, not a prerequisite.
processes. It is not an input.


81. What Is Amazon Ec2 In Aws Devops?

82. Is a culture change a requirement or a result of doing DevOps?
DevOps tools, not a prerequisite.
processes. It is not an input.

83.Describe branching strategies you have used.
Answer : This question is asked to test your branching experience so tell them about how you have used branching in your previous job and what purpose does it serves, you can refer the below points:

Feature branching
Task branching
In this model each task is implemented on its own branch with the task key included in the branch name. It is easy to see which code implements which task, just look for the task key in the branch name.
Release branching
Once the develop branch has acquired enough features for a release, you can clone that branch to form a Release branch. Creating this branch starts the next release cycle, so no new features can be added after this point, only bug fixes, documentation generation, and other release-oriented tasks should go in this branch. Once it is ready to ship, the release gets merged into master and tagged with a version number. In addition, it should be merged back into develop branch, which may have progressed since the release was initiated.
In the end tell them that branching strategies varies from one organization to another, so I know basic branching operations like delete, merge, checking out a branch etc.

84. Explain how you can move or copy Jenkins from one server to another?
You can:


85. Explain how can create a backup and copy files in Jenkins?

86. Explain how you can setup Jenkins job?
Answer : My approach to this answer will be to first mention how to create Jenkins job. Go to Jenkins top page, select “New Job”, then choose “Build a free-style software project”.
Then you can tell the elements of this freestyle job:

Optional SCM, such as CVS or Subversion where your source code resides.
Optional triggers to control when Jenkins will perform builds.

87. Mention some of the useful plugins in Jenkins.
Answer : Below, I have mentioned some important Plugins:

Maven 2 project
Amazon EC2
HTML publisher
Copy artifact
Green Balls
These Plugins, I feel are the most useful plugins. If you want to include any other Plugin that is not mentioned above, you can add them as well. But, make sure you first mention the above stated plugins and then add your own.

88. How will you secure Jenkins?

Ensure global security is on.
Limit physical access to Jenkins data/folders.
Periodically run security audits on same.

89. What is Automation Testing?
Answer : Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves use of separate testing tools which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention.

90. What are the benefits of Automation Testing?
Answer : I have listed down some advantages of automation testing. Include these in your answer and you can add your own experience of how Continuous Testing helped your previous company:

Supports execution of repeated test cases
Aids in testing a large test matrix
Enables parallel execution
Encourages unattended execution
Improves accuracy thereby reducing human generated errors
Saves time and money


91. How to automate Testing in DevOps lifecycle?
Answer : I have mentioned a generic flow below which you can refer to:
In DevOps, developers are required to commit all the changes made in the source code to a shared repository. Continuous Integration tools like Jenkins will pull the code from this shared repository every time a change is made in the code and deploy it for Continuous Testing that is done by tools like Selenium

92. What are the Testing types supported by Selenium?
Answer : Selenium supports two types of testing:
Regression Testing: It is the act of retesting a product around an area where a bug was fixed.
Functional Testing: It refers to the testing of software features (functional points) individually.

93. What is Selenium IDE?
Answer : My suggestion is to start this answer by defining Selenium IDE. It is an integrated development environment for Selenium scripts. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run in.
Now include some advantages in your answer. With autocomplete support and the ability to move commands around quickly, Selenium IDE is the ideal environment for creating Selenium tests no matter what style of tests you prefer.

94. What is the difference between Assert and Verify commands in Selenium?
Answer : I have mentioned differences between Assert and Verify commands below:

Assert command checks whether the given condition is true or false. Let’s say we assert whether the given element is present on the web page or not. If the condition is true, then the program control will execute the next test step. But, if the condition is false, the execution would stop and no further test would be executed.

96. How to launch Browser using WebDriver?
Answer : The following syntax can be used to launch Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();

97. When should I use Selenium Grid?
Answer : For this answer, my suggestion would be to give a small definition of Selenium Grid. It can be used to execute same or different test scripts on multiple platforms and browsers concurrently to achieve distributed test execution. This allows testing under different environments and saving execution time remarkably.

98. What is Ansible module?
Answer : Modules are considered to be the units of work in Ansible. Each module is mostly standalone and can be written in a standard scripting language such as Python, Perl, Ruby, bash, etc.. One of the guiding properties of modules is idempotency, which means that even if an operation is repeated multiple times e.g. upon recovery from an outage, it will always place the system into the same state.

99. What are playbooks in Ansible?
Answer : Playbooks are Ansible’s configuration, deployment, and orchestration language. They can describe a policy you want your remote systems to enforce, or a set of steps in a general IT process. Playbooks are designed to be human-readable and are developed in a basic text language.

100. How do I see a list of all of the ansible_ variables?
Answer : Ansible by default gathers “facts” about the machines under management, and these facts can be accessed in Playbooks and in templates. To see a list of all of the facts that are available about a machine, you can run the “setup” module as an ad-hoc action:
Ansible -m setup hostname
This will print out a dictionary of all of the facts that are available for that particular host

101. Can I refresh static components of a deployed application without having to redeploy the entire application?
Answer : Yes, you can use weblogic.Deployer to specify a component and target a server, using the following syntax:


]]> 0
Latest 101 AWS Interview Questions and Answers Wed, 28 Nov 2018 05:32:03 +0000 The post Latest 101 AWS Interview Questions and Answers appeared first on My Training Bangalore.


Here are the lists of most regularly inquired AWS Meet Questions and Answers in specialized interviews. These AWS questions and answers are appropriate for both fresher’s and experienced experts at any level. The questions are for halfway to to some degree progressed AWS experts, but indeed in case you’re fair a fledgling or fresher you ought to be able to get it the answers and clarifications here we donate. These AWS Meet Questions and Answers will direct you to clear.

1. What Is Aws?
Answer : AWS (Amazon Web Services) is a stage to give secure cloud administrations, database stockpiling, contributions to figure control, content conveyance, and different administrations to enable business to level and create.

2. What Are The Key Components Of Aws?
Answer : The fundamental elements of AWS are

Route 53: A DNS web service

Easy E-mail Service: It licenses tending to email using RESTFUL API request or through ordinary SMTP

Identity and Access Management: It gives uplifted assurance and personality control for your AWS account

Simple Storage Device or (S3): It is distribution center gear and the notable broadly used AWS benefit

Elastic Compute Cloud (EC2): It manages on-request figuring hotspots for facilitating purposes. It is to a great degree important in a bad position of variable remaining tasks at hand

Elastic Block Store (EBS): It presents relentless capacity masses that associate with EC2 to empower you to persist information past the life expectancy of a specific EC2

Cloud Watch: To watch AWS sources, It licenses directors to examine and get key Additionally, one can create a warning alarm in the condition of emergency.

3. What Is The Importance Of Buffer In Amazon Web Services?
Answer : An Elastic Load Balancer guarantees that the incoming traffic  is appropriated ideally crosswise over different AWS occurrences. A support will synchronize diverse parts and makes the course of action extra versatile to a burst of load or traffic. The segments are inclined to work in a precarious method for accepting and preparing the solicitations. The cushion makes the harmony connecting different mechanical assembly and specialties them exertion at the indistinguishable rate to supply more fast administrations.

4. What Is The Way To Secure Data For Carrying In The Cloud?
Answer : One thing must be guaranteed that nobody ought to grab the data in the cloud while information is moving from direct one toward another and furthermore there ought not be any spillage with the security enter from a few storerooms in the cloud. Isolation of data from extra organizations’ data and after that encoding it by methods for endorsed techniques is one of the choices.

5. Name The Several Layers Of Cloud Computing?
Answer : Here is the list of layers of the cloud computing

PaaS – Platform as a Service

IaaS – Infrastructure as a Service

SaaS – Software as a Service

6. Explain Can You Vertically Scale An Amazon Instance ? How?
Answer : Surely, you can vertically estimate on Amazon instance. During that

Twist up a fresh massive instance than the one you are currently governing

Delay that instance and separate the source webs mass of server and dispatch

Next, quit your existing instance and separate its source quantity

Note the different machine ID and connect that source mass to your fresh server

Also, begin it repeatedly Study AWS Training Online From Real Time Experts

7. What Are The Components Involved In Amazon Web Services?
Answer : There are 4 parts included and are as beneath. Amazon S3: with this, one can recover the key data which are possessed in making cloud auxiliary structure and measure of delivered data likewise can be put away in this segment is the outcome of the key indicated. Amazon EC2 example: supportive to run an extensive disseminated framework on the Hadoop group. Programmed parallelization and employment planning can be accomplished by this segment

 Amazon SQS: this component acts as a mediator between different controllers. Also worn for cushioning requirements those are obtained by the manager of Amazon.

 Amazon SimpleDB: helps in storing the transitional position log and the errands executed by the consumers.

8. What Is Lambda@edge In Aws?
Answer : In AWS, we can use Lambda@Edge utility to solve the problem of low network latency for end users.

In Lambda@Edge there is no need to provision or manage servers. We can just upload our Node.js code to AWS Lambda and create functions that will be triggered on CloudFront requests.

When a request for content is received by CloudFront edge location, the Lambda code is ready to execute.

This is a very good option for scaling up the operations in CloudFront without managing servers.

9. Distinguish Between Scalability And Flexibility?
Answer : The fitness of any plan to upgrade the errands available on its present equipment assets to hold irregularity in order is known as scalability . The ability of a plan to enlarge the assignments close by on its present and beneficial equipment property is perceived as flexibility, consequently empowering the business to gather direction without putting in the framework by any stretch of the imagination. AWS has a few setup the board answers for AWS scalability, flexibility, availability and management.

10. Name The Various Layers Of The Cloud Architecture?
Answer : There are 5 layers and are listed below

CC- Cluster Controller

SC- Storage Controller

CLC- Cloud Controller


NC- Node Controller


11. What Are The Different Types Of Events Triggered By Amazon Cloud Front?
Answer : Different types of events triggered by Amazon CloudFront are as follows:

Viewer Request: At the point when an end client or a customer program makes a HTTP/HTTPS ask for to CloudFront, this occasion is activated at the Edge Location closer to the end client.

Viewer Response: When a CloudFront server is ready to respond to a request, this event is triggered.

Origin Request: When CloudFront server does not have the requested object in its cache, the request is forwarded to Origin server. At this time this event is triggered.

Origin Response: When CloudFront server at an Edge location receives the response from Origin server, this event is triggered.

12. Which Automation Gears Can Help With Spinup Services?
Answer : The API instruments can be utilized for spinup administrations and furthermore for the composed contents. Those contents could be coded in Perl, slam or different dialects of your inclination. There is one more choice that is designed organization and stipulating devices, for example, a sham or enhanced relative. An instrument called Scalr can likewise be utilized lastly we can run with a controlled clarification like a Rightscale.

13. What Is An Ami? How Do I Build One?
Answer : AMI holds for Amazon Machine Image. It is effectively a snap of the source filesystem. Items apparatus servers have a bio that demonstrates the ace drive report of the underlying cut on a plate. A plate shape however can lie wherever physically on a circle, so Linux can boot from an outright position on the EBS distribution center interface.

Make an extraordinary AMI at starting pivoting up and example from an allowed AMI. Later joining mixes and segments as required. Contain careful about setting sensitive information over an AMI (learn salesforce on the web). For example, your way accreditations ought to be joined to a case later spinup. Among a database, mount an outer volume that conveys your MySQL information next spinup in reality enough.

14. What Are The Main Features Of Amazon Cloud Front?
Answer : Some of the main features of Amazon CloudFront are as follows:

Device Detection Protocol Detection Geo Targeting Cache Behavior Cross Origin Resource Sharing Multiple Origin Servers HTTP Cookies Query String Parameters Custom SSL.

15. What Is The Relation Between An Instance And Ami?
Answer : AMI can be explained as Amazon Machine Image, essentially, a format comprising programming design part. For instance an OS, applications, application server. On the off chance that you begin an occasion, a copy of the AMI consecutively as an implicit orderly in the cloud.

16. What Is Amazon Ec2 Service?
Answer : Amazon Elastic Compute Cloud (Amazon EC2) is a web benefit that gives resizable (versatile) processing limit in the cloud. You can utilize Amazon EC2 to dispatch the same number of virtual servers you require. In Amazon EC2 you can arrange security and systems administration and additionally oversee storage.Amazon EC2 benefit likewise helps in getting and designing limit utilizing negligible grinding. 

17. What Are The Features Of The Amazon Ec2 Service?
Answer : As the Amazon EC2 service is a cloud service so it has all the cloud features. Amazon EC2 provides the following features:

Virtual computing environment (known as instances)

Pre-configured templates for your instances (known as Amazon Machine Images – AMIs)

Amazon Machine Images (AMIs) is a complete package that you need for your server (including the operating system and additional software)

Amazon EC2 provides various configurations of CPU, memory, storage and networking capacity for your instances (known as instance type)

Secure login information for your instances using key pairs (AWS stores the public key and you can store the private key in a secure place)

Storage volumes of temporary data is deleted when you stop or terminate your instance (known as instance store volumes)

Amazon EC2 provides persistent storage volumes (using Amazon Elastic Block Store – EBS)


Static IP addresses for dynamic cloud computing (known as Elastic IP address)

Amazon EC2 provides metadata (known as tags)

Amazon EC2 provides virtual networks that are logically isolated from the rest of the AWS cloud, and that you can optionally connect to your own network (known as virtual private clouds – VPCs)

18. What Is Amazon Machine Image And What Is The Relation Between Instance And Ami?
Answer : Amazon Web Services gives a few different ways to get to Amazon EC2, similar to online interface, AWS Command Line Interface (CLI) and Amazon Tools for Windows Powershell. To begin with, you have to agree to accept an AWS record and you can get to Amazon EC2.

Amazon EC2 gives a Query API. These solicitations are HTTP or HTTPS asks for that utilization the HTTP action words GET or POST and a Query parameter named Action.

19. What Is Amazon Machine Image (ami)?
Answer : An Amazon Machine Image (AMI) is a format that contains a software configuration (for instance, a working framework, an application server, and applications). From an AMI, we dispatch an occurrence, which is a duplicate of the AMI running as a virtual server in the cloud. We can even dispatch various examples of an AMI.

20. What Is The Relation Between Instance And Ami?
Answer : We can launch different types of instances from a single AMI. An instance type essentially determines the hardware of the host computer used for your instance. Each instance type offers different compute and memory capabilities.

After we launch an instance, it looks like a traditional host, and we can interact with it as we would do with any computer. We have complete control of our instances; we can use sudo to run commands that require root privileges.


21. Explain Storage For Amazon Ec2 Instance.?
Answer : Amazon EC2 provides many data storage options for your instances. Each option has a unique combination of performance and durability. These storages can be used independently or in combination to suit your requirements.

There are mainly four types of storages provided by AWS:

Amazon EBS: Its durable, block-level storage volumes  can attached in running Amazon EC2 instance. The Amazon EBS volume persists independently from the running life of an Amazon EC2 instance. After an EBS volume is attached to an instance, you can use it like any other physical hard drive. Amazon EBS encryption feature supports encryption feature.

Amazon EC2 Instance Store: Storage disk that is attached to the host computer is referred to as instance store. The instance storage provides temporary block-level storage for Amazon EC2 instances. The data on an instance store volume persists only during the life of the associated Amazon EC2 instance; if you stop or terminate an instance, any data on instance store volumes is lost.


Adding Storage: Every time you launch an instance from an AMI, a root storage device is created for that instance. The root storage device contains all the information necessary to boot the instance. You can specify storage volumes in addition to the root device volume when you create an AMI or launch an instance using block device mapping.

22. What Are The Security Best Practices For Amazon Ec2?
Answer : There are several best practices for secure Amazon EC2. Following are few of them.

Use AWS Identity and Access Management (AM) to control access to your AWS resources.



Privilege — only open up permissions that you require.


23. Explain Stopping, Starting, And Terminating An Amazon Ec2 Instance?


24. Explain Elastic Block Storage? What Type Of Performance Can You Expect? How Do You Back It Up? How Do You Improve Performance?
Answer : EBS is a virtualized SAN or storage area network.  That means it is RAID storage to start with, so it’s redundant and fault tolerant.  If disks die in that RAID you don’t lose data.  Great! It is also virtualized, so you can provision and allocate storage, and attach it to your server with various API calls. No calling the storage expert and asking him or her to run specialized commands from the hardware vendor.

Performance on EBS can exhibit variability.  That is, it can go above the SLA performance level, then drop below it.  The SLA provides you with an average disk I/O rate you can expect. This can frustrate some folks, especially performance experts who expect reliable and consistent disk throughout on a server.  Traditional physically hosted servers behave that way. Virtual AWS instances do not.



25. VPCIs S3? What Is It Used For? Should Encryption Be Used?
Answer : S3 stands for Simple Storage Service.  You can think of it like FTP storage, where you can move files to and from there, but not mount it like a filesystem.  AWS automatically puts your snapshots there, as well as AMIs there.  Encrypt

26. What Is An Ami? How Do I Build One?
Answer : AMI stands for Amazon Machine Image. It is effectively a snapshot of the root filesystem. Commodity hardware, servers have a bios that points the master boot record of the first block on a disk. A disk image, though can sit anywhere physically on a disk, so Linux can boot from an arbitrary location on the EBS storage network.

Build a new AMI by first spinning up and instance from a trusted AMI.Then adding packages and components as required. Be wary of putting sensitive data onto an AMI.  For instance, your access credentials should be added to an instance after spinup with a database, mount an outside volume that holds your MySQL data after spinup as well.

27. Can I Vertically Scale An Amazon Instance? How?
Answer : Yes.This is an incredible feature of AWS and cloud virtualization.  Spin up a new larger instance than the one you are currently running.  Pause that instance and detach the root ebs volume from this server and discard.  Then stop your live instance, detach its root volume.  Note down the unique device ID and attach that root volume to your new server. And then start it again.  Voila, you have scaled vertically in-place!!

28. What Is Auto-scaling? How Does It Work?
Answer : Autoscaling is a feature of AWS which allows you to configure and automatically provision and spin up new instances without the need for your intervention. 

You do this by setting thresholds and metrics to monitor.  When those thresholds are crossed, a new instance of your choosing will be spun up, configured, and rolled into the load balancer pool. Voila, you’ve scaled horizontally without any operator intervention!

29. What Automation Tools Can I Use To Spin Up Servers?
Answer : The most obvious way is to roll-your-own scripts, and use the AWS API tools.  Such scripts could be written in bash, Perl or another language or your choice.

The next option is to use a configuration management and provisioning tools like puppet or better it’s successor Opscode Chef.You might also look towards a tool like Scalr. Lastly, you can go with a managed solution such as Rightscale.

30. What Is Configuration Management? Why Would I Want To Use It With Cloud Provisioning Of Resources?
Answer : Configuration management has been around for a long time in web operations and systems administration.  Yet the cultural popularity of it has been limited.  Most systems administrators configure machines as software was developed before version control – that is manually making changes on servers.  Each server can then and usually is slightly different.  Troubleshooting though, is straightforward as you login to the box and operate on it directly.  Configuration management brings a large automation tool in the picture, managing servers like strings of a puppet.  This forces standardization, best practices, and reproducibility as all configs are versioned and managed.  It also introduces a new way of working which is the biggest hurdle to its adoption.

Enter the cloud, then configuration management becomes even more critical.That’s because virtual servers such as amazons EC2 instances are much less reliable than physical ones.You absolutely need a mechanism to rebuild them as-is at any moment.This pushes best practices like automation, reproducibility and disaster recovery into center stage.


31. Explain How You Would Simulate Perimeter Security Using The Amazon Web Services Model?
Answer : Traditional perimeter security that we’re already familiar with using firewalls and so forth is not supported in the Amazon EC2 world.  AWS supports security groups.One can create a security group for a jump box with ssh access – only port 22 open.From there a webserver group and database group are created.The webserver group allows 80 and 443 from the world, but port 22 *only* from the jump box group.Further the database group allows port 3306 from the webserver group and port 22 from the jump box group.Add any machines to the webserver group and they can all hit the database.  No one from the world can, and no one can directly ssh to any of your boxe.

32. How To Use Amazon Sqs?

33. What is SimpleDB?
Answer : A data repository or structure record that encourages data doubts and indexing to both S3 and EC2 are called as SimpleDB.

34What is AWS Data pipeline?
Answer: A network service that can be applied to automate the alteration and migration of the information is called the AWS Data Pipeline. Using AWS, the data-driven workflows can be specified so that the businesses can rely on the achievement of early tasks.

35. List the features of Amazon cloud search?
Answer : The Amazon cloud search features:

Range searches

Prefix Searches

Boolean Searches

Entire text search with language specific text processing


AutoComplete advice

Faceting term boosting

36. What is Hybrid cloud architecture?
Answer : It is the type of architecture where the workload is divided into two halves among which one is on public load and the other is on the local storage.

37. What is Geo Restriction on cloud front?
Answer : It is also known as geo-blocking, that can be used avoid or block the users in particular geographic locations from accessing the content that is being distributed using a CloudFront web distribution.

38. Explain Amazon Kinesis Firehose?
Answer : It is fully sophistically managed service to deliver the real-time live streaming data to destinations like Amazon Simple Storage Service i.e., Amazon S3 and Amazon Redshift.

39. What is Amazon EMR?
Answer : It is a survived cluster stage that interprets the working of data structures, before the intimation as Apache Hadoop and Apache Spark on the Amazon Web Services to investigate a large amount of data.We can prepare data for the analytics goals and marketing intellect workloads using Apache Huive and relevant open source designs.

Upon that, Amazon EMR can be used to migrate and convert the big masses of data into other AWS data repositories such as Amazon S3 and Amazon DynamoDB.

40. Explain the terms ElastiCache and DynamoDB?
Answer : Elasticache:It is a web service that executes to set up, maintain and scale classified in-memory cache settings in the cloud.

DynamoDBIt is a controlled NoSQL database aid that can render anticipated and quick execution with seamless scalability.

The database table formulation to save and reclaim any quantity of data and support any level of the application can be done using Amazon DynamoDB.It automatically increases the transactions and data for the table for adequate servers to supervise the function and volume of data saved while keeping it constant and rapid execution.

Amazon-Web-Services-Interview-Question-and-Answers 4

41. Explain the AWS Certificate Manager?
Answer : AWS Certificate Manager, which can be shortened as ACM manages the complexity of extending, providing and regulating the certificates, which are granted over ACM to the user’s AWS based forms and websites.

People work on ACM to maintain and petition the certificates and practice other Amazon web services for the website’s purpose.

ACM certificates cannot be handled outside of AWS.

42. What is RedShift?
Answer : It is a petabyte-scale data repository service where execution is easy and cost-effective to efficiently investigate all over the data by employing the current marketing intelligence devices, which perform at high speed and are completely controllable.

43. What is Amazon SQS?
Answer : It is a component that acts as a mediator for two controllers.Also, as worn for the cushioning needs, which are obtained by the Amazon’s manager.

44. Mention the types of storages offered by AWS?
Answer :

Amazon EBS

Amazon EC2 instance store

Amazon S3

Addition storage

45. Is an internet gateway required to use peering connections?
Answer : No! Internet gateway is required in order to use virtual private cloud peering connections.

46. Can a primary instance be detached on the EC2 instance?
Answer : Yes, it is possible to attach and detach secondary interfaces on an instance of EC2, but in case of eth0 interface detaching is not possible.

List varioulayers of cloud Architecture?
ANS : CLC – Cloud controller

CC – Cluster Controller

SC – Storage Controller

NC – Node Controller


47. How to secure the data carrying in the cloud?
Answer : Ensuring that the information is not seized in the cloud while moving from one point to the other and also that there is no leakage with the security key from various storerooms in the cloud, we can rest assured that the dausrta in the cloud is secured.

Another option available is segregation of the information from the information of additional companies and then encrypting them by means of approved methods.

48. What is auto-scaling?
Answer : It is one of the outstanding features of AWS, which permits the arrangement and stipulation robotically and also the spin up fresh example without the user’s involvement.This feature can be achieved by setting metrics and brinks to the watch.

A fresh example of the user’s selection is configured, spinup and copied to the weight planner collection if we overcome all those entrances.

Answer : We can use a c4.8x large instance or i2.large for this, but using a c4.8x will require a better configuration on PC.

50. Can I connect my corporate datacenter to the Amazon Cloud?


51. How many subnets you can have per VPC ?
Answer : 200 subnets you can have per VPC

52. what type of IP address do you use for your Customer Gateway (CGW) address ?
Answer : PUBLIC IP address      

53. What is the importance of forming subnets? ?
Answer:  Smartly utilize network that have huge number of hosts

54. Which are the sorts of AMI given by AWS?
Answer: EBS Backed

Instance Store backed

55. Load Balancer and DNS service comes beneath which sort of cloud service?
Answer : IAAS-Storage

56. You have got chosen a windows instance with Classic and you need to form a few alter to the security gather. How will these changes be effective?
Answer : Changes are automatically connected to windows occurrences

57. Which is default instance type
Answer : On-demand

58. What is Elastic Computing?
Answer : You can spin up and spin down VMs                          

59. List the components required to construct Amazon VPC?
Answer : Subnet, Internet Gateway, NAT Gateway, HW VPN Connection, Virtual Private Gateway, Customer Gateway, Router, Peering Connection, VPC Endpoint for S3, Egress-only Internet Gateway.

60. How do you defend your EC2 occurrences running in a VPC?
Answer : Security Groups can be used to protect your EC2 instances in a VPC. We can configure both INBOUND and OUTBOUND traffic in a Security Group which enables secured access to your EC2 instances. Security Group automatically denies any unauthorized access to your EC2 instances.


61. In a VPC how numerous EC2 occurrences can you use?
Answer : At first you’re constrained to dispatch 20 EC2 Occurrences at one time. Most extreme VPC estimate is 65,536 occasions.

62. Can you build up a peering association to a VPC in a diverse Locale?
Answer : Not possible. Peering Connection are available only between VPC in the same region.

63. Can you interface your VPC with a VPC claimed by another AWS account?
Answer : Yes, Conceivable. Given the proprietor of other VPCs acknowledges your connection.

64. What are all the diverse network choices accessible for your VPC?
Answer : Internet Gateway, Virtual Private Gateway, NAT, EndPoints, Peering Connections.

65. Can a EC2 occurrence interior your VPC interface with the EC2 occurrence having a place to other VPCs?
Answer : Yes, Conceivable. Given an Online Door is designed in such a way that activity bounded for EC2 occurrences running in other VPCs.

66. How can you monitor network traffic in your VPC?
Answer : It is conceivable utilizing Amazon VPC Flow-Logs highlight.

67. What is the Distinction between Security Groups and ACLs in a VPC?
Answer : A Security Group characterizes which traffic is permitted TO or FROM EC2 occasion. Though ACL, controls at the SUBNET level, scrutinize the traffic TO or FROM a Subnet.

68. Hon an EC2 occasion in a VPC set up the association with the web?
Answer : Utilizing either a Public IP or an Elastic IP.

69. What is Auto Scaling?
Answer : Creating duplicate instances during heavy business hours. Scale-IN and Scale-OUT are two different statues of Scaling. Scale-IN: Reducing the instances. Scale-OUT: Increasing the instances by duplicating.

70. Distinction between Stopping and Terminating the Instances?
Answer : When you STOP an instance it is a normal shutdown. The corresponding EBS volume attached to that instance remains attached and you can restart the instance later. When you TERMINATE an instance it gets deleted and you cannot restart that instance again later. And any EBS volume attached with that instance also deleted.


71. When you launch a standby Relational Database Service instance will it be available in the same Available Zone?
Answer : Not prudent. Since the reason of having standby RDS instance is to maintain a strategic distance from an foundation disappointment. So you’ve got to keep your standby RDS benefit in a distinctive Accessibility Zone, which may have diverse infrastructure.

72. Distinction between Amazon RDS, DynamoDB and Redshift?
Answer : RDS is meant for structured data only. DynamoDB is meant for unstructured data which is a NoSQL service. Redshift is a data warehouse product used for data analysis.

73. What are Lifecycle Hooks?
Answer: Lifecycle Hooks are utilized in Auto Scaling. Lifecycle hooks empower you to perform custom activities by delaying instances as an Auto Scaling gather dispatches or ends them. Each Auto Scaling group can have different lifecycle hooks.


75. Can S3 be used with EC2 instances, if yes, how?


76. What is AWS Lambada?
Answer : Lambda is an event-driven stage. It could be a compute benefit that runs code in reaction to occasions and consequently oversees the compute assets required by that code.

77. In S3 how many buckets can be created?
Answer : By default 100 buckets can be created in a region.

78. What is CloudFront?
Answer : Amazon CloudFront is a service that speeds up transfer of your static and dynamic web content such as HTML files, IMAGE files., etc., CloudFront delivers your particulars thru worldwide data centers named Edge Locations.

79. Brief about S3 service in AWS?
Answer :  S3, a Simple Storage Service from Amazon. You can move your files TO and FROM S3. Its like a FTP storage. You can keep your SNAPSHOTS in S3. You can also ENCRYPT your sensitive data in S3.

80. Explain Regions and Available Zones in EC2?
Answer : Amazon has hosted EC2 in various locations around the world. These locations are called REGIONS. For example in Asia, Mumbai is one region and Singapore is another region. Each region is composed of isolated locations which are known as AVAILABLE ZONES.    Region is independent. But the Available Zones are linked thru low-latency links.


81.What are the two types of Load Balancer?
Answer : Classic LB and Application LB. ALB is the Content Based Routing.

82. Can a AMI be shared?
Answer : Yes. A developer can create an AMI and share it with other developers for their use. A shared AMI is packed with the components you need and you  can customize the same as per your needs. As you are not an owner of a shared AMI there is a risk always involved.

83. What is a Hypervisor?
Answer : A Hypervisor could be a kind of program that empowers Virtualization. It combines physical equipment assets into a stage which is conveyed essentially to one or more clients. XEN is the Hypervisor for EC2.

84. Key Pair and its uses?
Answer : You use Key Pair to login to your Instance in a secured way. You can create a key pair using EC2 console. When your instances are spread across regions you need to create key pair in each region.

85. What is the feature of ClassicLink?
Answer : ClassicLink allows instances in EC2 classic platform to communicate with instances in VPC using Private IP address. EC2 classic platform instances cannot not be linked to more than one VPC at a time.

86. Can you edit a Route Table in VPC?
Answer : Yes. You can always modify route rules to specify which subnets are routed to the Internet gateway, the virtual private gateway, or other instances.

87. How many Elastic IPs can you create?
Answer : 5 VPC Elastic IP addresses per AWS account per region

88. Can you ping the router or default gateway that connects your subnets?
Answer : NO, you cannot. It is not supported. However you can ping EC2 instances within a VPC, provided your firewall, Security Groups and network ACLs allows such traffic.

89. How will you monitor the network traffic in a VPC?
Answer : Using Amazon VPC Flow Logs feature.

90. Can you make a VPC available in multiple Available Zones?
Answer : Yes,


91. How do you guarantee an EC2 occasion is propelled in a specific Accessible Zone?
Answer : After selecting your AMI Format and Occurrence Sort, within the third step whereas arranging the occasion you must select the SUBNET in which you would like to dispatch your occurrence. It’ll be propelled within the AZ related with that SUBNET.

92. For Internet Gateways do you find any Bandwidth constraints?
Answer : NO. Regularly an IG is Evenly SCALLED, Repetitive and Profoundly Accessible. It isn’t having nay Transfer speed imperatives usually.

93. What is the importance of a Default VPC?
Answer : When you launch your instances in a Default VPC in a Region, you would be getting the benefit of advanced Network Functionalities. You can also make use of Security Groups, multiple IP addresses, and multiple Network interfaces.

94. Can you make utilize of default EBS Snapshots?
Answer : You’ll use, provided on the off chance that it is found within the same locale where your VPC is displayed.

95. What will happen after you erase a PEERING Association in your side?
Answer : The PEERING CONNECTION available in the other side would also get terminated. There will no more traffic flow.

96. Can you establish a Peering connection to a VPC in a different region?
Answer : NO. Its possible between VPCs in the same region.

97. Can you connect your VPC with a VPC created by another AWS account?
Answer : Yes. Only when that owner accepts your peering connection request.

98. What is the name of AWS CEO or Chief ?
Answer : Jeff Bezos

99. EC2 officially launch in which year?
Answer : 2006

100. S3 Launched officially lunched in which year?
Answer : 2006

101. What is the use of Amazon Transfer Acceleration Service?
Answer : ATA service speeds up your data transfer with the use of optimized network paths. Also, speed up your CDN up to 300% compared to normal data transfer speed


]]> 0
Latest 101 Salesforce Interview Questions and Answers Tue, 27 Nov 2018 09:57:55 +0000 The post Latest 101 Salesforce Interview Questions and Answers appeared first on My Training Bangalore.



Here are some important interview questions on Salesforce.

1.Can two users have the same profile? Can two profiles be assigned to the same user?
Answer:   Profiles decide the dimension of access a client can have in a Salesforce organization.

To the extent the initial segment of the inquiry is concerned, yes. One profile can be doled out to any number of clients. Take the case of a Sales or Service group in an organization. The whole group will be allocated a similar profile. The administrator can make one profile: Sales Profile, which will approach the Leads, Opportunities, Campaigns, Contacts and different articles esteemed essential by the organization.

Along these lines, numerous clients can be appointed a similar profile. On the off chance that the group captain or chief need access to extra records/protests then it tends to be finished by allotting consent sets just for those clients.

Answering the second part of the question, each user can only be assigned 1 profile.

2. What are Governor Limits in Salesforce?
Answer:  In Salesforce, it is the Governor Limits which controls how much information or what number of records you can store in the mutual databases. Why? Since Salesforce depends on the idea of multi-inhabitant engineering. In more straightforward words, Salesforce uses a single database to store the data of multiple clients/ customers.

To ensure no single customer consumes the common assets, Salesforce presented the idea of Governor Limits which is entirely implemented by the Apex run-time engine.

Governor Limits are a Salesforce developer’s greatest test. That is in such a case that the Apex code ever surpasses the limit, the normal representative issues a run-time exemption that can’t be taken care of. Henceforth as a Salesforce developer, you must be exceptionally watchful while building up your application.

Different Governor Limits in Salesforce are:

Per-Transaction Apex Limits Platform Apex Limits

Static Apex Limits

Size-Specific Apex Limits

Miscellaneous Apex Limits

Email Limits

Push Notification Limits

3. What is a sandbox org? What are the different types of sandboxes in Salesforce?
Answer : A sandbox is a copy of the production environment/organization, utilized for testing and advancement purposes. It’s helpful on the grounds that it permits advancement on Apex programming without irritating the creation condition.

When can you use it?

You can utilize it when you need to test a recently created application or Visualforce page. You can create and test it in the Sandbox organization as opposed to doing it specifically underway.  This way, you can build up the application with no problem and after that relocate the metadata and information (if appropriate) to the production environment. Doing this in a non-production environment allows developers to freely test and experiment applications end to end.

Types of Sandboxes are:


Developer Pro

Partial Copy


Answer : No, it is not possible to edit apex classes and triggers directly in production environment. It needs to be done first in Developer edition or testing org or in Sandbox org. Then, to deploy it in production, a user with Author Apex permission must deploy the triggers and classes using deployment tools. However, Visualforce pages can be created and edited in both sandbox and in production.

Only if the page has to do something unique (different values), it would have to be developed via Sandbox.

5. What are the different data types that a standard field record name can have?
Answer : A standard field record name can have data type of either auto number or text field with a limit of 80 chars. For generating auto numbers, the format needs to be specified while defining the field and after that for every record that is added, the number will get auto generated. For example:

Sr No – {1}

Sr No – {2}

Sr No – {3}

6.Why are Visualforce pages served from a different domain?
Answer : Visual force pages are served from an alternate domain to enhance security principles and square cross site scripting.

7. What is WhoId and WhatId in activities?
Answer : WhoID refers to individuals. Normally: contacts or leads. Example: Lead ID, Contact ID 

WhatID alludes to objects. Example: Account ID, Opportunity ID

8. What is the use of writing sharing rules? Can you use sharing rules to restrict data access?
Answer :  Sharing rules are written to give edit access (public read and write) or public read only access to certain individuals in Salesforce org. A classic example is when:- only your managers or superiors need to be given extra credentials to your records in objects as compared to your peers.

As a matter of course, all clients in your association will have association wide-default sharing settings of either Public Read Only or Private.

To offer access to more records, which clients don’t possess, we compose sharing principles.



9.What are the different types of email templates that can be created in Salesforce?
Answer :  The different types of Email templates are listed as below:-

Text: All users can create or change this template

HTML with letterhead: Only Administrators and users having “Edit HTML Templates” permissions can create this template based on a letterhead.

Custom HTML: Administrators and users having “Edit HTML Templates” permissions can create this template without the need of a letterhead

Visualforce : Only administrators and developers can create this template. Advanced functionalities like merging data from multiple records is available only in this template

10. What is a bucket field in reports?
Answer : A bucket field lets you group related records together by ranges and segments, without the use of complex formulas and custom fields. Bucketing can thus be used to group, filter, or arrange report data. When you create a bucket field, you need to define multiple categories (buckets) that are used to group report values.

The advantage is that earlier, we had to create custom fields to group or segment certain data.


11.What are the different types of object relations in salesforce? How can you create them?
Answer : The different types of object relationships in Salesforce are:

Master-Detail Relationship (1:n):- It is a parent-child relationship in which the master object controls the behavior of the dependent child object. It is a 1:n relationship, in which there can be only one parent, but many children.The main concept you need to be know is that, being the controlling object, the master field cannot be empty. If a record/ field in master object is deleted, the corresponding fields in the dependent object are also deleted. This is called a cascade delete. Dependent fields will inherit the owner, sharing and security settings from its master.You can define master-detail relationships between two custom objects, or between a custom object and standard object as long as the standard object is the master in the relationship.
Lookup Relationship (1:n):-Lookup relationships are used when you want to create a link between two objects, but without the dependency on the parent object. Similar to Master-Detail relationship, you can think of this as a form of parent-child relationship where there is only one parent, but many children i.e. 1:n relationship.The difference here is that despite being controlling field, deleting a record will not result in automatic deletion of the lookup field in the child object. Thus the records in the child object will not be affected and there is no cascade delete here. Neither will the child fields inherit the owner, sharing or security settings of its parent.
Junction Relationship (Many-To-Many):-This kind of a relationship can exist when there is a need to create two master-detail relationships. Two master-detail relationships can be created by linking 3 custom objects. Here, two objects will be master objects and the third object will be dependent on both the objects. In simpler words, it will be a child object for both the master objects.

Answer : In a Master-Detail relationship, when a master record is deleted, the detail record is deleted automatically (Cascade delete).

In a Lookup relationship, even if the parent record is deleted, the child record will not be deleted.

13.Can you have a roll up summary field in case of Master-Detail relationship?
Answer : Yes. You can have a roll-up summary in case of a master-detail relationship. But not in case of a lookup relationship.

A roll-up summary field is used to display a value in a master record based on the values of a set of fields in a detail record. The detail record must be related to the master through a master-detail relationship.

There are 4 calculations that you can do using roll-up summary field. You can count the number of detail records related to a master record. Or, you can calculate the sum, minimum value, or maximum value of a field in the detail records

14.Explain the term “Data Skew” in Salesforce.
Answer : “Data skew” is a condition which you will encounter when working for a big client where there are over 10,000 records. When one single user owns that many records we call that condition ‘ownership data skew’.

When such users perform updates, performance issues will be encountered because of “data skew”. This happens when a single user/ members of a single role own most of the records for a particular object.

15. Explain skinny table. What are the considerations for Skinny Table?
Answer : In Salesforce, skinny tables are used to access frequently used fields and to avoid joins. This largely improves performance. Skinny tables are highly effective, so much so that even when the source tables are modified, skinny tables will be in sync with source tables.

Considerations for skinny tables:

Skinny tables can contain a maximum of 100 columns.

Skinny tables cannot contain fields from other objects.

For full sandboxes: Skinny tables are copied to your Full sandbox organizations, as of the Summer ’15 release.

16. Which fields are automatically Indexed in Salesforce?
Answer :  Only the following fields are automatically indexed in Salesforce:

Primary keys (Id, Name and Owner fields).

Foreign keys (lookup or master-detail relationship fields).

Audit dates (such as SystemModStamp).

Custom fields marked as an External ID or a unique field.

17. How to handle comma within a field while uploading using Data Loader?
Answer :  In a Data Loader .CSV, if there is a comma in field content, you will have to enclose the contents within double quotation marks: ” “.

18. For which criteria in workflow “time dependent workflow action” cannot be created?
Answer : Time dependent workflow action cannot be create for: “created, and every time it’s edited”.

19. What are the types of custom settings in Salesforce? What is the advantage of using custom settings?
Answer :  There are two types of custom settings in Salesforce: List Custom Settings and Hierarchy Custom Settings.

List Custom Settings are a type of custom settings that provides a reusable set of static data that can be accessed across your organization irrespective of user/ profile.

Hierarchy Custom Settings are another type of custom settings that uses built-in hierarchical logic for “personalizing” settings for specific profiles or users.

The advantage of using custom settings is that it allows developers to create a custom set of access rules for various users and profiles.

20. How many active assignment rules can you have in a lead/ case?
Answer : Only one rule can be active at a time.


21. What are custom labels in Salesforce? What is the character limit of custom label?
Answer : Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values here can be translated into any language supported by Salesforce.

Their benefit is that they enable developers to create multilingual applications which automatically presents information in a user’s native language.


22. What is the difference between a Role and Profile in Salesforce?
Answer :  As mentioned in one of the previous Salesforce interview questions, a profile will ultimately control access to which records a user has in a Salesforce org. No user can work on the Salesforce org without being assigned a profile. The Profile is therefore mandatory for every user.

Role however is not mandatory for every user. The primary function of the Role/ Role hierarchy is that it allows higher level users in hierarchy get access to records owned by lower level users in the hierarchy. An example of that is Sales Managers getting access to records owned by Sales Reps while their peers do not get access to it.

23. What are the examples of non-deterministic formula fields? 
Answer : Before I mention some of the examples, let me give you an introduction to deterministic and non-deterministic formula fields. Formula fields whose value will be static are referred to as deterministic fields. Whereas, formula fields whose value will be changed dynamically or whose values will have to be calculated on the fly, they are referred to as non-deterministic formula fields. A classic example of that is a formula returning the current date and time.

Some examples of non-deterministic fields in are:

Lookup fields

Formula fields whose reference spans over other entities

Fields having dynamic date functions like:- TODAY() or NOW()

24. Why do we need to write test classes? How to identify if a class is a test class?
Answer : Software developers from around the world will unanimously agree that writing code in test classes makes debugging more efficient. Why? That is because test classes help in creating robust and error-free code be it Apex or any other programming language. Since Unit tests are powerful in their own right, Salesforce requires you to write test classes in Apex code

Why are they so powerful? Because test classes and test methods verify whether a particular piece of code is working properly or not. If that piece of code fails, then developers/ testers can accurately locate the test class having the faulty bug.

Test classes can be determined easily because every test class will be annotated with @isTest keyword. In fact, if we do not annotate a test class with @isTest, then it cannot be defined as a test class. Similarly, any method within a class which has the keyword testMethod, is a test method.

25. What is minimum test coverage required for trigger to deploy?
Answer : In Salesforce, if you want to deploy your code to production, then you must make sure that at least 75% of your Apex code is covered by unit tests. And all these tests must complete successfully.

26. What are the different ways of deployment in Salesforce?
Answer : You can deploy code in Salesforce using:

Change Sets

Eclipse with IDE Migration Tool – ANT/Java based

Salesforce Package

27. What is an external ID in Salesforce? Which all field data types can be used as external IDs?
Answer : An external ID is a custom field which can be used as a unique identifier in a record. External IDs are mainly used while importing records/ data. When importing records, one among the many fields in those records need to be marked as an external ID (unique identifier).

An important point to note is that only custom fields can be used as External IDs. The fields that can be marked as external IDs are: Text, Number, E-Mail and Auto-Number.

28. How many callouts to external service can be made in a single Apex transaction?
Answer : Governor limits will restrict a single Apex transaction to make a maximum of 100 callouts to an HTTP request or an API call.

29. How can you expose an Apex class as a REST WebService in Salesforce?
Answer :  You can expose your Apex class and methods so that external applications can access your code and your application through the REST architecture. This is done by defining your Apex class with the @RestResource annotation to expose it as a REST resource. You can then use global classes and a WebService callback method.

Invoking a custom Apex REST Web service method always uses system context. Consequently, the current user’s credentials are not used, and any user who has access to these methods can use their full power, regardless of permissions, field-level security, or sharing rules.

Developers who expose methods using the Apex REST annotations should therefore take care that they are not inadvertently exposing any sensitive data.

30. What is the difference between a standard controller and a custom controller?
Answer : Standard controller in Apex, inherits all the standard object properties and standard button functionality directly. It contains the same functionality and logic that are used for standard Salesforce pages.

Custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Custom Controllers are associated with Visualforce pages through the controller attribute.


31. How can we implement pagination in Visualforce?
Answer : To control the number of records displayed on each page, we use pagination. By default, a list controller returns 20 records on the page. To customize it, we can use a controller extension to set the pageSize.

32. How can you call a controller method from JavaScript?
Answer : To call a controller method (Apex function) from JavaScript, you need to use actionfunction.

33. How to get the UserID of all the currently logged in users using Apex code?
ANS :  You can get the ID’s of all the currently logged in users by using this global function: UserInfo.getUserId().

34. How many records can a select query return? How many records can a SOSL query return?
Answer : The Governor Limits enforces the following:-

Maximum number of records that can be retrieved by SOQL command: 50,000.

Maximum number of records that can be retrieved by SOSL command: 2,000.

35. What is an attribute tag? What is the syntax for including them?
Answer : An attribute tag is a definition of an attribute of a custom component and it can only be a child of a component tag.

Note that you cannot define attributes with names like id or rendered. These attributes are automatically created  for all custom component definitions.

36. What are the three types of bindings used in Visualforce? What does each refer to?
Answer : There are three types of bindings used in Salesforce:-

Data bindings, which refer to the data set in the controller

Action bindings, which refer to action methods in the controller

Component bindings, which refer to other Visualforce components.

Data bindings and Action bindings are the most common and they will be used in every Visualforce page.

37. What are the different types of collections in Apex? What are maps in Apex?
Answer : Collections are the type of variables which can be used to store multiple number of records (data).

It is useful because Governor Limits restrict the number of records you can retrieve per transaction. Hence, collections can be used to store multiple records in a single variable defined as type collection and by retrieving data in the form of collections, Governor Limits will be in check. Collections are similar to how arrays work.

There are 3 collection types in Salesforce:




Maps are used to store data in the form of key-value pairs, where each unique key maps to a single value.
Syntax: Map<String, String> country_city = new Map<String, String>();

38. How can you embed a Visualflow in a Visualforce page?
Answer : 1.  Find the flow’s unique name.

From Setup, enter Flows in the Quick Find box, then select Flows.

Click the name of the flow.

Copy the unique name of the flow.


Define a new Visualforce page, or open an existing one.

Add the <flow:interview> component somewhere between the <apex:page> tags.

Set the name attribute to the unique name of the flow.

For example:


<flow:interview name=”flowuniquename”/>


Click Save.

Restrict which users can access the Visualforce page.

Click Visualforce Pages.

Click Security next to your Visualforce page.

Move all the appropriate profiles from Available Profiles to Enabled Profiles by using the ‘add’ and ‘remove’ buttons.

Click Save.

Add the Visualforce page to your app by using a custom button, link, or Visualforce tab.

39. What is the use of “@future” annotation?
Answer : Future annotations are used to identify and execute methods asynchronously. If the method is annotated with “@future”, then it will be executed only when Salesforce has the available resources.


40. What are the different methods of batch Apex class? 
Answer : Database.Batchable interface contains three methods that must be implemented:

Start method:


Execute method:


Finish method:

global void finish(Database.BatchableContext BC){}


41. What is a Visualforce component? 
Answer : A Visualforce Component is either a predefined component (standard from component library) or a custom component that determines the user interface behavior. For example, if you want to send the text captured from the Visualforce page to an object in Salesforce, then you need to make use of Visualforce components. Example: <apex:detail>

42. What is 
Answer : is a command which returns the list of records that have been added recently to the sObjects. To be more precise, those records will be returned which are yet to be saved to the database. Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.

But just for your information, Trigger.old returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers.

43. What all data types can a set store? 
Answer : Sets can have any of the following data types:

Primitive types



User-defined types

Built-in Apex types

44. What is an sObject type? 
Answer : An sObject is any object that can be stored in the platform database. Apex allows the use of generic sObject abstract type to represent any object.

For example, Vehicle is a generic type and Car, Motor Bike all are concrete types of Vehicle.
In SFDC, sObject is generic and Account, Opportunity, CustomObject__c are its concrete type.

45. What is the difference between SOQL and SOSL? 
Answer : The differences are mentioned in the table below:


Only one object can be searched at a time Many objects can be searched at a time
Can query any type of field Can query only on email, text or phone
Can be used in classes and triggers Can be used in classes, but not triggers
DML Operation can be performed on query results DML Operation cannot be performed on search results
Returns records Returns fields

46. What is an Apex transaction?
Answer : An Apex transaction represents a set of operations that are executed as a single unit. The operations here include the DML operations which are responsible for querying records. All the DML operations in a transaction either complete successfully, or if an error occurs even in saving a single record, then the entire transaction is rolled back.

47. What is the difference between public and global class in Apex?
Answer : Global class is accessible across the Salesforce instance irrespective of namespaces.
Whereas, public classes are accessible only in the corresponding namespaces.

48. What are getter methods and setter methods?
Answer : Get (getter) method is used to pass values from the controller to the VF page.
Whereas, the set (setter) method is used to set the value back to controller variable.

I hope this set of Salesforce interview questions will help you ace your job interview. As the next step for your career, check out the various certifications offered by Salesforce here: Salesforce Certifications. It will also help you to understand the job roles and chalk out a career path for yourself.

49. What is Apex in Salesforce?
Answer : Apex is a strongly typed object-oriented programming language.
It allows the developer to execute flows and transaction control statements.
Apex enables developers to add business logic to most system events like button clicks related record updates and visualforce pages

50. What is Apex Programming Language?
Answer :
Integrated: It provides built-in support for DML Calls
Inline Salesforce Object Query Language
Easy to Use
Easy to Test
Multi Tenant Aware Application


51. When Should I Use Apex?
Answer : To create Email services

Create web services

Perform complex validation over multiple objects

To create complex business processes that are not supported by workflow.

Create custom transaction logic

Attach custom logic to another operation

52. How Does Apex Work?
Answer : All Apex programs runs entirely ON-Demand on Platform.

The compile code is stored to metadata.
When the end users triggers the execution of Apex by clicking button or visualforce page the application servers retrieves the compiled instructions from the metadata and send them to runtime interpreter before returning the result.

53. What is Apex Email Service?

Visualforce email templates cannot be used for mass emails.
We can associate each email services with one or more salesforce generated email address to which the users can send messages for processing.

54. What is Map Class in Apex Salesforce?
Answer : Map Class Contains methods for the Map collection type.

A Map is collection of key values pairs where each unique key maps to a single value.

Map keys and values can be any data type primitive types, collections, sObjects, users defined types, and built in Apex Types.


Country(Key) Currency (Value)
‘United States’ ‘Dollar’
‘Japan’ ‘Yen’
;France’ ‘Euro’
‘England’ ‘Pound’
‘India’ ‘Rupee’

55. What is SOQL?
Answer: A query language that allows you to construct simple but powerful query strings and to specify the criteria that should be used to select the data from the platform database. SOQL Stands for Slaesforce Object Query Language.

56. What Are The Types of SOQL Statements in SalesForce?

There are 2 types of SOQL Statements.

Static SOQL
Dynamic SOQL
1.Static SOQL: The oStatic SOQL Statement is written in []  (Array Brackets)

This statements are similar to IINQ(Ion Integrated Query)


String search for =’Jones’;


Dynamic SOQL:

Dynamic SOQL enables you to create more flexible application.


Return a single sObjects when the query returns a single record.

sObjects s = Database. Query(String_limit_l);




String myTestString = ‘TestName’;



String resolviedfield L = myvariable.field__c;


57. What is The Syntax of SOQL Statement?
Answer : SELECT field1, field2,…. FROM Object_Type [WHERE condition]

List accountList =

    [SELECT ID, Name, FROM Account];

List accountList =


58. What is Apex Interface?
NOTE: Generally the interface methods we give it as global.

59. What is Batch Apex in Salesforce?

This would help us to execute on more than 10,000 records as, it won’t perform an operation on all the records in a single transaction instead it dividing them into Number of subtasks where each subtask may contain the records up to 4000.

60. What is Apex Scheduler?
Answer : It will invokes the Apex class to run at specific time.
Schedule Interface:


Public void execute(schedulablecontext sc)


Public class mySchedule implements schedulable


Public void execute(schedulablecontext sc)


Account a = new Account(Name = ‘Faraz’)

Insert a;




61. What is the Apex Trigger in Salesforce?
Answer : Trigger is a Apex Code that executes before or after.

The following types of DML Operation:
What are The Types of Apex Triggers in Salesforce?
Triggers Are divided into 2 types

Before Triggers
After Triggers
After Triggers: After Triggers Before Triggers can be used to access field values of the records that are the stored in the database and use this values to make changes in other records.

Trigger trigger_name on Object_Name(trigger_events)




WHERE trigger_events can be comma separated list of events.

62. What is Apex Managed Sharing?
Answer: Apex Managed Sharing provides developers with the ability to support an application to share a requirements.
This type of sharing available to only users with modify all data permissions. Only this users can add/change apex managed sharing.
Apex Managed Sharing uses a Sharing reason (Apex Sharing Reason)


Syntax :


64. SOSL Statements In Salesforce Apex?
Answer : SOSL statement evaluate to a list of sobjects , where each list contains the search results for a particular sobject type, The result lists are always returned in the same order as they were specified in the query.


For example, you can return a list of accounts, contacts, opportunities and leds that begin with the phase map.

List < list < subject >> search list = [ find ‘map*’ In ALL FIELDS RETURNING Account (ID, Name), contact, opportunity, lead ];

Note :

The syntax of the classon Apex differs from the syntax of the FIND clause in the SOAP API.

FIND ‘map*’ IN ALL FIELDS RETURNING account (Id, Name], Contact, Opportunity, Lead.


For Example:







65. Javascript remoting for apex controllers
Answer : Use javascript remoting in visualforce to call methods in apex controllers from javascript.
Javascript remoting has 3 parts.

The remote method invocation you add to the visualforce page, written in javascript.
The remote method definition in your Apex controller class.
The response handles callback function you add to or include in your vf page, written in javascript.

66. Adding javascript remoting to a vf page
Answer : To use javascript remoting in a vf page , add the request as a java script invocation with the following from.

[namespace.] controller.method (


Call back Function,



Name space is the namespace of the controller class
Controllers is the name of your apex controller.
Method is the name of your apex controller method you are calling.
Parameters is the comma-separated list of parameters that your method takes.
Callback function is the name of the javascript function that will handle the response from the controller.
Configuration configures the handling of remote call and response.

67. What is the main difference between using data table vs .page block table tags?
Answer : PageBlock: For default salesforce standard format.

Data table: To design custom formats

Answer : tag

69. What is Multitenant Architecture?
Answer : An application model in which all users and apps share a single, Common infrastructure and code base.

70. What is metadata – driven development model?`
Answer : An app development model that allows apps to be defined as declarative ‘blueprints”, with no code required. Data Models, objects, forms, workflows, and more are defined by Metadata.

Salesforce-Interview-Questions-and-Answers 1

71. List examples of custom field types?

72. What is TAB in Salesforce?
Answer: Tab is a user interface component to user creates to display custom object data.

There are three type of tabs.

Custom Tabs

Visual force Tabs

Web Tabs

73. Can a user create insert their own custom logo, while creating their own custom applications?

74. List things that can be customized on page layouts?

75. What are force platform sites?
Answer: Public websites and applications that are directly integrated with your salesforce organization without requiring users to log in with a username and password.

76. What is an AppExchange directory?
Answer: A web directory where hundreds of appexchange apps are available to salesforce customers to review, demo, comment upon, and /or install. Developers can submit their apps for listing on the appexchange directory if they want to share them with the community.

77. What are some apex classes that are commonly used within controller?
Answer: Standard controller, select option, page reference, message, etc,

78. What are the effects of using the transient keyword?
Answer: The transient keyword prevents the data from being saved in to view state. This should be used for very temporary variables.

79. What is Metadata-driven development model?

80. What is S-Control?
Answer: S-Controls are the predominant widgets which are completely based on JavaScript. These are hosted by salesforce but executed at client side. S-Controls are superseded by VisualForce now

Salesforce-Interview-Questions-and-Answers 2

81. Will Visualforce still supports the merge fields usage like S-control?
Answer: Yes. Just like S-Controls. Visualforce pages support embedded merge fields.

82. What is SOAP?

83. What is a Time Trigger?
Answer: A setting that defines when time-dependent workflow actions should fire.


85. List things that can be customized on page layouts?

86. What is a “Self Relationship”?
Answer: Self Relationship is a lookup relationship to the same object. Suppose let’s take an object “Merchandise”. Here we can create relationship in between the Account to Account (same object) object. That is called “Self Relationship”.


88. What is a Wrapper class?
Answer: A Wrapper class is a class whose instances are collection of other objects.
It is used to display different objects on a VF (Visual Force) page in same table.

89. What is difference insert() and database .insert() ?
Answer: Using insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted.If we want to execute partially success of bulk insert operation we will use database .insert.

90. What are Static Resources?
Answer: Using Static Resources we can upload images, zip files, jar files, javascript and CSS files that can be referred in a visual force page.
The maximum size of Static Resources for an organization is 250mB.

Salesforce-Interview-Questions-and-Answers 3

91. How to call javascript using Static Resource in Visual Force page?
We can use that file as follows in Visual Force page

92. What is sharing rule?
Answer: If we want to give access to other users we use sharing rules.

93. Can report data be accessed programmatically?
Answer: Update for Winter ’14 API:
I think the biggest announcement that developers have been waiting for API wise is the availability of our Analytics API. We introduced a limited pilot in summer 13 and now the Analytics REST API is generally available. The Analytics API lets you integrate Salesforce report data into your apps programmatically and has several resources that let you query metadata, and record details.
Source – Winter 14 Developer Preview

94. Is there a defacto 3rd party utilities library for Apex such as Apache Commons is for Java?
Answer: Apex-lang is about as close to a Java-style library as you can get. Contains several string, database, and collection utilities that mimmick Java functionality. Be aware though, some stuff including Comparing and Sorting collections is out of date with the advent of the Comparable interface in Apex.In addition to apex-lang, and like you suggest, I typically create or reuse static helper methods throughout my projects. Static helper methods are very convenient for reusing code in Chatter functionality, DML handling, Exception handling, Unit testing, etc.

95. What are the implications of implementing Database. Stateful?
Answer: Daniel Ballinger: No, batches do not ever run simultaneously. You are correct, however, that serialization is the culprit here.
grigriforce: what’s your batch size? If you’re doing a million records, and your batch size is 1, then you will serialize/deserialize your state 1M times. Even with a small serialized object, that’s gonna hurt.

96. What are the recommended ways to refactor in Apex?
Answer: I use the second method. After refactoring, I select the ‘src’ folder, use File Search/Replace and all the changes are made and saved to the server in one go.

97. Grammar for creating an Apex parser
Answer: Keep an eye on Apex tooling api, which is used in Developer console. This is supposed to be released to public access soon.

98. Detect the current LoggingLevel in Apex
Answer: Unfortunately, I don’t think there is a way to check the current logging level in APEX.

99. Call Apex class method on the fly (dynamically)
Answer: While you can instantiate a class based on its name using the Type system class, you can’t dynamically locate a method and execute it. The best that you can do is to dynamically create an instance of a class that implements an interface and executes one of the methods on the interface.
There’s more information on the Type class and an example in the :
Apex Developer’s Guide

100. How many relationships included in SFDC & What are they?
Answer: We are having two types of relationships, they are
• Lookup Relationship
• Master-Detail Relationship

101. How can I create Many – to – Many relationships?
Answer: Lookup and Master-detail relationships are one too many relationships. We can create many – to – Many relationships by using a junction object. Junction object is a custom object with two master-detail relationships.


]]> 0