Live Classes: Upskill your knowledge Now!
Chat NowCreated by - Admin s
A list of top frequently asked J2EE Interview Questions and answers are given below.1) What do you understand by J2EE?J2EE stands for Java 2 Enterprise Edition. The functionality of J2EE is developing and deploying multi-tier web-based enterprise applications. The J2EE platform is the combination of a set of services, application programming interfaces (APIs), and protocols. The J2EE platform adds the capabilities required to provide a complete, stable, secure, and fast Java platform at the enterprise level.2) What do you mean by J2EE Module?A J2EE module is a software unit that consists of one or more J2EE components for the same container type with one deployment descriptor of that type. Modules can be easily deployed or assembled into J2EE applications.3) What are the four types of J2EE modules?J2EE defines four types of modules:46M887How to find Nth Highest Salary in SQLApplication Client ModuleWEB ModuleEnterprise JavaBeans ModuleResource Adapter Module4) What does the application client module contain?Application client module contains the following:Class filesClient deployment descriptorIt is packaged as JAR files with a .jar extension.5) What does the web module contain?The web module contains the following:JSP (Java Server Pages) filesClass files for servletsWeb deployment descriptorGIF (Graphics Interchange Format) and HTML (Hypertext Markup Language) filesThese modules are packaged as JAR files with a .war (Web Archive) extension.6) What does Enterprise JavaBeans module contain?The Enterprise JavaBeans (EJB) module contains the following:Class files for enterprise beansAn EJB deployment descriptorThese modules are packaged as JAR files with a .jar extension.7) What does resource adapt module contain?The resource adapter module contains the following:Java interfacesClassesNative librariesOther documentationResource Adapter deployment descriptorThese modules are packaged as JAR files with a .rar (Resource Adapter Archive) extension.8) What are the main components of the J2EE application?A J2EE component is assembled into a J2EE application with its related classes and files. It can also communicate with other components. The J2EE defines the following main components:Application clients components.Java Servlet and JavaServer Pages technology components.Business Components (Enterprise JavaBeans).Resource adaptor components.9) What is considered as a web component?Java Servlet and Java Server Pages technology components are considered as web components. Servlets are based on Java programming language which dynamically receives requests and generates responses. Java Server pages execute as servlets and allow a more natural approach to creating static content.10) What are the types of J2EE clients?AppletsApplication clientsJava Web Start-enabled clientsWireless clients11) What do you understand by a word applet?An applet is a J2EE component that typically executes in a web browser. It can also be executed in a variety of other applications or devices that support the applet programming model.12) What is the container?A container is the runtime support of a system level entity. Containers provide components with features such as lifecycle management, security, deployment, and threading.13) What is an "applet container"?A container that provides support for the applet programming model is known as "applet container."14) What do you understand by a thin client?A thin client is a light-weight interface to the application that does not support operations like query database, execute complex business rules, or connect to legacy applications.15) What is JavaServer Faces (JSF)?JavaServer Faces is a user interface (UI) designing framework which is used for Java-based web applications. JavaServer Faces provides a set of reusable UI components- a standard for web applications. JSF is based on the MVC design pattern. It automatically saves the form data to the server and populates the form dates when display on the client side.16) What is an EJB platform?EJB stands for The Enterprise JavaBeans. EJB platform manages functions such as transaction and state management, resource pooling, multithreading, and simple searches while you concentrate on writing business logic.17) What do you mean by the deployment descriptor?A deployment descriptor is based on XML (Extensible Markup Language) that supports .xml extension. It is used to describe a component's deployment settings. A J2EE application and its module, both have its deployment descriptor.18) Define the Struts in the J2EE framework?Struts is an application development framework based on MVC (Model-View-Controller) architecture. It is a combination of Java Servlets, JSP, Custom tags, and messages. It is used to design applications for large enterprises. It can be described as:ModelThe model defines the internal state of a system. It can be either single or a cluster of Java Beans based on app architecture.ViewJSP technology is used to design a view of any enterprise application.ControllerA controller is used to manage the actions of users. It processes the client request and responds based on the request. The main component in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings.19) Define Hashtable in J2EE?Hashtable is similar to HashMap except that Hashtable is synchronized. Hashtable is a cluster of synchronized objects where null values and duplicate values are not allowed.20) Define Hibernate and HQL?Hibernate is an object-relational mapping and query service. In hibernate, we can write HQL (Hibernate Query Language) scripts instead of SQL, which saves lots of time and effort. Hibernate provides a more powerful association, inheritance, polymorphism, composition, and collections. We can process queries easily into the database using the Java objects. Hibernate also allows us to express queries using Java-based criteria.21) What are the limitations of Hibernate?Following are some limitations of hibernate:Slower execution of queries.Only HQL support is available for composite keys.No shared references are available to the value type.22) What are the major benefits of hibernate?Following are some major benefits of hibernate:Hibernate is independent of database and vendor so it is the portable framework.Domain objects can be mapped to the relational database.JPA support for standard ORM.Better database connectivity in Hibernate when compared to JDBC.23) Define ORM and its working in J2EE?ORM refers to Object-Relational mapping. It is the object in a Java class which is mapped into the tables of a relational database using the metadata that describes the mapping between the objects and database. It transforms the data from one representation to another.24) What is authorization?An authorization is a process by which access to a method or resource is determined. It relies on the determination of whether the principal associated with a request through authentication is in a given security role. A security role can be explained as a logical grouping of users defined by the person who assembles the application. A deployer maps the security roles to security identities. Security identities may be principles or groups in the operational environment.25) Define authorization constraint?An authorization rule which determines who is permitted to access Web resource collection is known as authorization constraint.26) How will you explain save() and saveorupdate() methods in hibernate?The Save() method in hibernate is used to store an object in the database. It creates a new entry if the record doesn't exist.The Saveorupdate() method in hibernate is used for updating the object using the identifier. If the identifier is unavailable, this method calls save(). If the identifier is available, it will call the update method.27) How will you explain load() and get() methods?Load(): If an object is missing in the Cache or database, Load() method will throw an exception. Load() method never returns null.Get(): If an object is missing in the Cache or database, Get() method returns a null value, not the exception.28) What is a web container in J2EE?An interface between a component and the low-level platform with defined functionality that is designed to support the component is defined as the web container in J2EE.29) What is the concept of connection pooling?Connection pooling is a simple concept which is popular to reuse existing connections. It means that if object connections are already well-defined and connected, then they can be reused whenever there is a requirement instead of generating a new one.30) What do you understand by the servlet?Servlet is a server-side component which provides full functionalities to create a server-side program. There are different servlets available with a specific design for a variety of protocols. The most popular type of protocol for the servlet is HTTP.Servlets, which use the classes in the java packages javax.servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession;. All servlets must include the Servlet interface, which defines life-cycle methods.31) Give some advantages of ORM (object-relational mapping)?ProductivityThe automatic code is generated to reduce the overall data access time based on the data model defined.PerformanceThe complete requirements of an application are managed by the automated code generated by the ORM, which means that there is no need for any extra code, and the overall data access process is made faster and optimized.Vendor IndependentThe generated code is independent of the vendor, which increases the overall portability of an application.MaintainabilityThe code is well tested and generated by the ORM, and only a developer can understand the code perfectly.32) Tell about the core interfaces of the hibernate framework?Session InterfaceSessionFactory InterfaceConfiguration InterfaceTransaction InterfaceQuery and Criteria Interface33) What is B2b?B2b indicates to business-to-business.34) What is the file extension used for hibernate mapping file and hibernate configuration file?For hibernate mapping, the file name should be like filename.hbm.xml.For hibernate configuration, the file name should be like hibernate.cfg.xml.35) Define a way to add Hibernate mapping file in hibernate configuration file?It can be easily performed by: 36) What are the main components of multi-tier architecture?The main components of multi-tier architecture are:Presentation TierThe front-end component existing in this tier is used to display the presentation.Resource TierThe back-end component existing in this tier is used to communicate with the database.Business TierThe component existing in this tier is used to provide business logic for the system.37) Explain JTA, JNDI, and JMS.JTA represents JAVA Transaction API, which is used for coordinating and managing transactions across the enterprise information system.JNDI represents Java Naming Directory Interface, which is used for accessing data from directory services.JMS represents the Java Messaging Service, which is used for receiving and sending messages through messaging systems.38) Explain the J2EE tiers.J2EE has the following tiers:Client TierIt indicates to the browser from which request is processed to the server. The interfaces that are available in this tier are HTML browser, Java application, an applet, or a non-java application.Middle TierIt comprises of a presentation tier and integration tier. The UI (User Interface) is created in the presentation tier using JavaServer Pages. The business logic is written inside the business tier with the help of Enterprise Java Bean. The objects of the database are created in the integration tier.BackendIt constitutes the Enterprise Information System (EIS) which is used to store the data.39) Describe the EAR, WAR, and JAR.EAR stands for Enterprise Archive file. It consists of the components of the web, EJB, and client. All the components of the EAR are packed in a compressed file with the extension .ear.WAR stands for a Web Archive file. It consists of all the components related to the web application. All the components are packed in a compressed file with the extension .war.JAR stands for Java Archive file. It consists of all the class files and library files, which constitute an API (Application Programming Interface). All the components are packed in a compressed file with the extension .jar.Each type of file (.ear, .war, and .jar) is processed uniquely by application servers, servlet containers, EJB containers, etc.40) What do you understand by Spring?Spring is a light-weight open source framework for developing enterprise applications. It resolves the complexity of enterprise application development and provides easy development for the J2EE. It was initially written by Rod Johnson. It was released under the Apache 2.0 license in June 2003.41) What are the different modules used in Spring?There are mainly seven core modules in spring:The Core container moduleObject/Relational mapping moduleDAO moduleApplication context moduleAspect Oriented ProgrammingWeb moduleMVC module42) What is action mapping?In action mapping, a user specifies action class for a particular URL, i.e., path and different target view, which means, forwards on to which request-response is forwarded. The ActionMapping defines the information that the ActionServlet knows about the mapping of a particular request to an instance of a specific Action class. The mapping is transferred to the execute() method of the Action class, enabling access to this information directly.43) What do you understand by ActionForm?ActionForm is a Java bean which may associate one or more ActionMappings. A java bean changes to FormBean when a user extends a class org.apache.struts.action.ActionForm. ActionForm object is generally populated on the server side automatically, and the client enters data from UI. ActionForm manages the session state for a web application.44) What is backing bean?A backing bean is a JavaBeans component which corresponds to JavaServer Pages that includes JavaServer Faces components. The backing bean describes the properties for the components on the page and methods which perform processing for the component.This processing may include event handling, validation, and processing associated with navigation.45) What is the build file?A build file is an XML file that consists of one or more asant targets. A target is a set of tasks that a user wants to get executed. When starting asant, a user can select which target is to be executed. If there is no target, then the default target of the project is executed.46) What do you understand by business logic?Business logic is the code that includes the functionality of an application. In the EJB (Enterprise JavaBeans) architecture, this logic is implemented by the methods of an enterprise bean.47) How will you explain CDATA?A CDATA is a predefined XML tag for the character data, which means "don't interpret these characters," it is similar to parsed character data (PCDATA), in which the standard rules of XML syntax apply. CDATA sections are used to show examples of XML syntax.48) What do you mean by the Component Contract?The contract between the J2EE component and its container is known as the component contract. This type of contract includes:Life-cycle management of the componentAn interface which is used by instance to obtain various information and services from its containerList of services that every container must provide for its components.49) What do you understand by Connector? Explain Connector Architecture.A connector is a standard extension mechanism for containers, which provides connectivity to enterprise information systems. It is specific to an enterprise information system and contains a resource adapter and application development tools for enterprise information system connectivity. The resource adapter is plugged into a container through its support for system-level contracts, defined in the Connector architecture.An architecture for the integration of J2EE products with enterprise information systems is known as the connector architecture. A connector architecture consists of:A resource adapter which is given by an enterprise information system vendorA J2EE product that allows this resource adapter to plug in.Connector architecture also defines a set of contracts which a resource adapter must support to plug into a J2EE product (e.g., transactions, security, and resource management).
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of top frequently asked Deep Learning Interview Questions and answers are given below.1) What is deep learning?Deep learning is a part of machine learning with an algorithm inspired by the structure and function of the brain, which is called an artificial neural network. In the mid-1960s, Alexey Grigorevich Ivakhnenko published the first general, while working on deep learning network. Deep learning is suited over a range of fields such as computer vision, speech recognition, natural language processing, etc.2) What are the main differences between AI, Machine Learning, and Deep Learning?AI stands for Artificial Intelligence. It is a technique which enables machines to mimic human behavior.Machine Learning is a subset of AI which uses statistical methods to enable machines to improve with experiences.Deep learning is a part of Machine learning, which makes the computation of multi-layer neural networks feasible. It takes advantage of neural networks to simulate human-like decision making.3) Differentiate supervised and unsupervised deep learning procedures.Supervised learning is a system in which both input and desired output data are provided. Input and output data are labeled to provide a learning basis for future data processing.Unsupervised procedure does not need labeling information explicitly, and the operations can be carried out without the same. The common unsupervised learning method is cluster analysis. It is used for exploratory data analysis to find hidden patterns or grouping in data.4) What are the applications of deep learning?There are various applications of deep learning:Computer visionNatural language processing and pattern recognitionImage recognition and processingMachine translationSentiment analysisQuestion Answering systemObject Classification and DetectionAutomatic Handwriting GenerationAutomatic Text Generation.5) Do you think that deep network is better than a shallow one?Both shallow and deep networks are good enough and capable of approximating any function. But for the same level of accuracy, deeper networks can be much more efficient in terms of computation and number of parameters. Deeper networks can create deep representations. At every layer, the network learns a new, more abstract representation of the input.Play Videox6) What do you mean by "overfitting"?Overfitting is the most common issue which occurs in deep learning. It usually occurs when a deep learning algorithm apprehends the sound of specific data. It also appears when the particular algorithm is well suitable for the data and shows up when the algorithm or model represents high variance and low bias.7) What is Backpropagation?Backpropagation is a training algorithm which is used for multilayer neural networks. It transfers the error information from the end of the network to all the weights inside the network. It allows the efficient computation of the gradient.Backpropagation can be divided into the following steps:It can forward propagation of training data through the network to generate output.It uses target value and output value to compute error derivative concerning output activations.It can backpropagate to compute the derivative of the error concerning output activations in the previous layer and continue for all hidden layers.It uses the previously calculated derivatives for output and all hidden layers to calculate the error derivative concerning weights.It updates the weights.8) What is the function of the Fourier Transform in Deep Learning?Fourier transform package is highly efficient for analyzing, maintaining, and managing a large databases. The software is created with a high-quality feature known as the special portrayal. One can effectively utilize it to generate real-time array data, which is extremely helpful for processing all categories of signals.9) Describe the theory of autonomous form of deep learning in a few words.There are several forms and categories available for the particular subject, but the autonomous pattern represents independent or unspecified mathematical bases which are free from any specific categorizer or formula.10) What is the use of Deep learning in today's age, and how is it adding data scientists?Deep learning has brought significant changes or revolution in the field of machine learning and data science. The concept of a complex neural network (CNN) is the main center of attention for data scientists. It is widely taken because of its advantages in performing next-level machine learning operations. The advantages of deep learning also include the process of clarifying and simplifying issues based on an algorithm due to its utmost flexible and adaptable nature. It is one of the rare procedures which allow the movement of data in independent pathways. Most of the data scientists are viewing this particular medium as an advanced additive and extended way to the existing process of machine learning and utilizing the same for solving complex day to day issues.11) What are the deep learning frameworks or tools?Deep learning frameworks or tools are:Tensorflow, Keras, Chainer, Pytorch, Theano & Ecosystem, Caffe2, CNTK, DyNetGensim, DSSTNE, Gluon, Paddle, Mxnet, BigDL12) What are the disadvantages of deep learning?There are some disadvantages of deep learning, which are:Deep learning model takes longer time to execute the model. In some cases, it even takes several days to execute a single model depends on complexity.The deep learning model is not good for small data sets, and it fails here.13) What is the meaning of term weight initialization in neural networks?In neural networking, weight initialization is one of the essential factors. A bad weight initialization prevents a network from learning. On the other side, a good weight initialization helps in giving a quicker convergence and a better overall error. Biases can be initialized to zero. The standard rule for setting the weights is to be close to zero without being too small.14) Explain Data Normalization.Data normalization is an essential preprocessing step, which is used to rescale values to fit in a specific range. It assures better convergence during backpropagation. In general, data normalization boils down to subtracting the mean of each data point and dividing by its standard deviation.15) Why is zero initialization not a good weight initialization process?If the set of weights in the network is put to a zero, then all the neurons at each layer will start producing the same output and the same gradients during backpropagation.As a result, the network cannot learn at all because there is no source of asymmetry between neurons. That is the reason why we need to add randomness to the weight initialization process.16) What are the prerequisites for starting in Deep Learning?There are some basic requirements for starting in Deep Learning, which are:Machine LearningMathematicsPython Programming17) What are the supervised learning algorithms in Deep learning?Artificial neural networkConvolution neural networkRecurrent neural network18) What are the unsupervised learning algorithms in Deep learning?Self Organizing MapsDeep belief networks (Boltzmann Machine)Auto Encoders19) How many layers in the neural network?Input LayerThe input layer contains input neurons which send information to the hidden layer.Hidden LayerThe hidden layer is used to send data to the output layer.Output LayerThe data is made available at the output layer.20) What is the use of the Activation function?The activation function is used to introduce nonlinearity into the neural network so that it can learn more complex function. Without the Activation function, the neural network would be only able to learn function, which is a linear combination of its input data.Activation function translates the inputs into outputs. The activation function is responsible for deciding whether a neuron should be activated or not. It makes the decision by calculating the weighted sum and further adding bias with it. The basic purpose of the activation function is to introduce non-linearity into the output of a neuron.21) How many types of activation function are available?Binary StepSigmoidTanhReLULeaky ReLUSoftmaxSwish22) What is a binary step function?The binary step function is an activation function, which is usually based on a threshold. If the input value is above or below a particular threshold limit, the neuron is activated, then it sends the same signal to the next layer. This function does not allow multi-value outputs.23) What is the sigmoid function?The sigmoid activation function is also called the logistic function. It is traditionally a trendy activation function for neural networks. The input data to the function is transformed into a value between 0.0 and 1.0. Input values that are much larger than 1.0 are transformed to the value 1.0. Similarly, values that are much smaller than 0.0 are transformed into 0.0. The shape of the function for all possible inputs is an S-shape from zero up through 0.5 to 1.0. It was the default activation used on neural networks, in the early 1990s.24) What is Tanh function?The hyperbolic tangent function, also known as tanh for short, is a similar shaped nonlinear activation function. It provides output values between -1.0 and 1.0. Later in the 1990s and through the 2000s, this function was preferred over the sigmoid activation function as models. It was easier to train and often had better predictive performance.25) What is ReLU function?A node or unit which implements the activation function is referred to as a rectified linear activation unit or ReLU for short. Generally, networks that use the rectifier function for the hidden layers are referred to as rectified networks.Adoption of ReLU may easily be considered one of the few milestones in the deep learning revolution.26) What is the use of leaky ReLU function?The Leaky ReLU (LReLU or LReL) manages the function to allow small negative values when the input is less than zero.27) What is the softmax function?The softmax function is used to calculate the probability distribution of the event over 'n' different events. One of the main advantages of using softmax is the output probabilities range. The range will be between 0 to 1, and the sum of all the probabilities will be equal to one. When the softmax function is used for multi-classification model, it returns the probabilities of each class, and the target class will have a high probability.28) What is a Swish function?Swish is a new, self-gated activation function. Researchers at Google discovered the Swish function. According to their paper, it performs better than ReLU with a similar level of computational efficiency.29) What is the most used activation function?Relu function is the most used activation function. It helps us to solve vanishing gradient problems.30) Can Relu function be used in output layer?No, Relu function has to be used in hidden layers.31) In which layer softmax activation function used?Softmax activation function has to be used in the output layer.32) What do you understand by Autoencoder?Autoencoder is an artificial neural network. It can learn representation for a set of data without any supervision. The network automatically learns by copying its input to the output; typically,internet representation consists of smaller dimensions than the input vector. As a result, they can learn efficient ways of representing the data. Autoencoder consists of two parts; an encoder tries to fit the inputs to the internal representation, and a decoder converts the internal state to the outputs.33) What do you mean by Dropout?Dropout is a cheap regulation technique used for reducing overfitting in neural networks. We randomly drop out a set of nodes at each training step. As a result, we create a different model for each training case, and all of these models share weights. It's a form of model averaging.34) What do you understand by Tensors?Tensors are nothing but a de facto for representing the data in deep learning. They are just multidimensional arrays, which allows us to represent the data having higher dimensions. In general, we deal with high dimensional data sets where dimensions refer to different features present in the data set.35) What do you understand by Boltzmann Machine?A Boltzmann machine (also known as stochastic Hopfield network with hidden units) is a type of recurrent neural network. In a Boltzmann machine, nodes make binary decisions with some bias. Boltzmann machines can be strung together to create more sophisticated systems such as deep belief networks. Boltzmann Machines can be used to optimize the solution to a problem.Some important points about Boltzmann Machine-It uses a recurrent structure.It consists of stochastic neurons, which include one of the two possible states, either 1 or 0.The neurons present in this are either in an adaptive state (free state) or clamped state (frozen state).If we apply simulated annealing or discrete Hopfield network, then it would become a Boltzmann Machine.36) What is Model Capacity?The capacity of a deep learning neural network controls the scope of the types of mapping functions that it can learn. Model capacity can approximate any given function. When there is a higher model capacity, it means that the larger amount of information can be stored in the network.37) What is the cost function?A cost function describes us how well the neural network is performing with respect to its given training sample and the expected output. It may depend on variables such as weights and biases.It provides the performance of a neural network as a whole. In deep learning, our priority is to minimize the cost function. That's why we prefer to use the concept of gradient descent.38) Explain gradient descent?An optimization algorithm that is used to minimize some function by repeatedly moving in the direction of steepest descent as specified by the negative of the gradient is known as gradient descent. It's an iteration algorithm, in every iteration algorithm, we compute the gradient of a cost function, concerning each parameter and update the parameter of the function via the following formula:Where,Θ - is the parameter vector,α - learning rate,J(Θ) - is a cost functionIn machine learning, it is used to update the parameters of our model. Parameters represent the coefficients in linear regression and weights in neural networks.39) Explain the following variant of Gradient Descent: Stochastic, Batch, and Mini-batch?Stochastic Gradient DescentStochastic gradient descent is used to calculate the gradient and update the parameters by using only a single training example.Batch Gradient DescentBatch gradient descent is used to calculate the gradients for the whole dataset and perform just one update at each iteration.Mini-batch Gradient DescentMini-batch gradient descent is a variation of stochastic gradient descent. Instead of a single training example, mini-batch of samples is used. Mini-batch gradient descent is one of the most popular optimization algorithms.40) What are the main benefits of Mini-batch Gradient Descent?It is computationally efficient compared to stochastic gradient descent.It improves generalization by finding flat minima.It improves convergence by using mini-batches. We can approximate the gradient of the entire training set, which might help to avoid local minima.41) What is matrix element-wise multiplication? Explain with an example.Element-wise matrix multiplication is used to take two matrices of the same dimensions. It further produces another combined matrix with the elements that are a product of corresponding elements of matrix a and b.42) What do you understand by a convolutional neural network?A convolutional neural network, often called CNN, is a feedforward neural network. It uses convolution in at least one of its layers. The convolutional layer contains a set of filter (kernels). This filter is sliding across the entire input image, computing the dot product between the weights of the filter and the input image. As a result of training, the network automatically learns filters that can detect specific features.43) Explain the different layers of CNN.There are four layered concepts that we should understand in CNN (Convolutional Neural Network):ConvolutionThis layer comprises of a set of independent filters. All these filters are initialized randomly. These filters then become our parameters which will be learned by the network subsequently.ReLUThe ReLu layer is used with the convolutional layer.PoolingIt reduces the spatial size of the representation to lower the number of parameters and computation in the network. This layer operates on each feature map independently.Full CollectednessNeurons in a completely connected layer have complete connections to all activations in the previous layer, as seen in regular Neural Networks. Their activations can be easily computed with a matrix multiplication followed by a bias offset.44) What is an RNN?RNN stands for Recurrent Neural Networks. These are the artificial neural networks which are designed to recognize patterns in sequences of data such as handwriting, text, the spoken word, genomes, and numerical time series data. RNN use backpropagation algorithm for training because of their internal memory. RNN can remember important things about the input they received, which enables them to be very precise in predicting what's coming next.45) What are the issues faced while training in Recurrent Networks?Recurrent Neural Network uses backpropagation algorithm for training, but it is applied on every timestamp. It is usually known as Back-propagation Through Time (BTT).There are two significant issues with Back-propagation, such as:Vanishing GradientWhen we perform Back-propagation, the gradients tend to get smaller and smaller because we keep on moving backward in the Network. As a result, the neurons in the earlier layer learn very slowly if we compare it with the neurons in the later layers.Earlier layers are more valuable because they are responsible for learning and detecting simple patterns. They are the building blocks of the network.If they provide improper or inaccurate results, then how can we expect the next layers and complete network to perform nicely and provide accurate results. The training procedure tales long, and the prediction accuracy of the model decreases.Exploding GradientExploding gradients are the main problem when large error gradients accumulate. They provide result in very large updates to neural network model weights during training.Gradient Descent process works best when updates are small and controlled. When the magnitudes of the gradient accumulate, an unstable network is likely to occur. It can cause poor prediction of results or even a model that reports nothing useful.46) Explain the importance of LSTM.LSTM stands for Long short-term memory. It is an artificial RNN (Recurrent Neural Network) architecture, which is used in the field of deep learning. LSTM has feedback connections which makes it a "general purpose computer." It can process not only a single data point but also entire sequences of data.They are a special kind of RNN which are capable of learning long-term dependencies.47) What are the different layers of Autoencoders? Explain briefly.An autoencoder contains three layers:EncoderThe encoder is used to compress the input into a latent space representation. It encodes the input images as a compressed representation in a reduced dimension. The compressed images are the distorted version of the original image.CodeThe code layer is used to represent the compressed input which is fed to the decoder.DecoderThe decoder layer decodes the encoded image back to its original dimension. The decoded image is a reduced reconstruction of the original image. It is automatically reconstructed from the latent space representation.48) What do you understand by Deep Autoencoders?Deep Autoencoder is the extension of the simple Autoencoder. The first layer present in DeepAutoencoder is responsible for first-order functions in the raw input. The second layer is responsible for second-order functions corresponding to patterns in the appearance of first-order functions. Deeper layers which are available in the Deep Autoencoder tend to learn even high-order features.A deep autoencoder is the combination of two, symmetrical deep-belief networks:First four or five shallow layers represent the encoding half.The other combination of four or five layers makes up the decoding half.49) What are the three steps to developing the necessary assumption structure in Deep learning?The procedure of developing an assumption structure involves three specific actions.The first step contains algorithm development. This particular process is lengthy.The second step contains algorithm analyzing, which represents the in-process methodology.The third step is about implementing the general algorithm in the final procedure. The entire framework is interlinked and required for throughout the process.50) What do you understand by Perceptron? Also, explain its type.A perceptron is a neural network unit (an artificial neuron) that does certain computations to detect features. It is an algorithm for supervised learning of binary classifiers. This algorithm is used to enable neurons to learn and processes elements in the training set one at a time.There are two types of perceptrons:Single-Layer PerceptronSingle layer perceptrons can learn only linearly separable patterns.Multilayer PerceptronsMultilayer perceptrons or feedforward neural networks with two or more layers have the higher processing power.
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of top frequently asked Salesforce Interview Questions and answers are given below.1) What is Salesforce?Salesforce is a cloud-based service. It is a customer relationship management (CRM) platform. Salesforce is a software as a Service (SaaS). It helps you to manage customer relationships, integrate with other systems, and build apps. The tool helps you to manage and create a custom solution as per your business requirement.Before Salesforce, companies had their servers for customer relationship management (CRM). They were costly and time taking. They were very hard to use. Feasible solution to this problem is to build an affordable CRM software and delivering it entirely online as a service.In a few years, there has been a significant surge in cloud computing technologies. Salesforce has an immense impact on the world of computing. Salesforce is developed as the fifth largest software company in the world. It is the top CRM service provider.Play Videox2) What is an app in Salesforce?An app is a collection of tabs that works as a unit to provide functionality. Users can switch between apps in force.com app's drop-down menu.A Salesforce application is a container of tabs, processes, and services.We can create new apps by grouping some standard app, customize existing apps according to our work.Salesforce provides many standard apps such as call center, marketing, sales, etc.There are two types of Salesforce application:Custom AppService cloud controlSalesforce create applicationFollow the below steps to create a Salesforce app:Step1: Follow this navigation: Setup-> AppSetup-> create-> apps-> click on 'new'Step2: Select custom application radio button-> provide the app nameStep3: Click on the next buttonStep4: Select the image from the document objectStep5: Select the objectsStep6: Click on the visible checkbox and saveTo add this Salesforce app to any other profiles or tabs. Follow the below stepsStep1: Setup-> Appsetup-> create-> apps->Step2: Select the app from the list and click on editStep3: If we want to change the image, then click on insert an image and take the image from documents.3) What are objects in Salesforce?Objects are the database tables in Salesforce. Objects allow storing data specific to the organization in Salesforce.There are two types of objects in Salesforce:Standard objectsCustom objectsStandard objectsStandard objects are such objects that are inbuilt in Salesforce.com.Example: accounts, contacts, products, leads, opportunities, campaigns, users, contracts, Report, and dashboards, etc.Custom objectsCustom objects are such objects that are created by us. These objects are user-defined objects. Custom objects store information which is important and unique to our organization.Custom objects are an integral part of any application. They provide a structure for sharing data.Custom objects hold the following properties.Custom fieldsRelationship to other objectsPage layoutsA custom user interface tab4) What are user profiles in Salesforce?User profiles are a group of permissions and settings which provide lightning access to a user. Salesforce admins can assign the users with a profile depending upon their job roles. The user profile includes all the tabs, records, and page access that user require.You can set up and manage the profile by which you can conventionally create a secure boundary that dictates user's access rights.5) Can we assign the same profile to two different users? Is it possible that two profiles can be assigned to the same user?The profile defines the level of access a user can have in Salesforce.In Salesforce org, it is possible to assign a single profile to any number of users. For example, we can consider a sales or service team in a company. The entire team has access to the same profile. The admin can create one profile for the whole sales team, which will have access to the leads, campaigns, contacts, and other objects deemed necessary by the company.In this functionality, many users can be assigned with the same profile. In case the team leader needs access to additional records, then it can be done by assigning permission sets only for those users.Each user can be assigned only one profile.6) What is the difference between Force.com and Salesforce.com?Salesforce.com is a software as a service (SaaS), and Force.com is a platform as a service (PaaS).7) What is the relationship in Salesforce? What are its types?We can establish a relation between objects in Salesforce. We can associate one object with others.Example: We have an object party (To store information about the party), and you want to associate it with other objects like people (information of participants) so that you can associate the object party with people. These relationship types also determine how they handle record sharing, required field in page layouts, data deletion capability.Salesforce supports the following types of relationships that can be established among objects.Master-Detail RelationshipLookup relationshipSelf-relationshipExternal lookup relationshipIndirect lookup relationshipMany-to-Many relationshipHierarchical relationship8) What is Master-detail relationship?It's a tightly coupled relationship among Salesforce objects. In the Master-detail relationship, the parent record controls the behavior of the child record regarding visibility and sharing. If a master record gets deleted, then the child records associated with it are also deleted. The security setting of the parent object applies to the child object.Example:If we create a Master-detail relationship between the objects party and people. Where a party is a parent object, and people is a child object. Then if we delete party record, all the associated record will also get deleted.When two objects form a Master-detail relationship, we can create a unique type of field over the master object, called Roll-up summary.A Roll-up summary allows us to calculate values related to child record, such as the number of child record, average, sum, etc., linked to a parent record.9) What is the lookup relationship?It's a loosely coupled relationship among Salesforce objects. In the Lookup relationship, both parent and child have their sharing setting and security controls, which means if a parent record gets deleted, then child records remain in the system.Let's see the party and the people objects. For example, the below figure provdes a visual representation of the Lookup relationship between the party and people objects.In this diagram, the party object record has been deleted, but the people record is still available. This relationship between objects is Lookup relationship.10) What are reports in Salesforce?Reports are an essential part of any business. Descriptions provide a clear picture of the management.Reports are used to track the process towards its various tasks, control expenditure, increase revenue. Reports help in trend prediction.Salesforce.com allows you to generate reports in different styles.In Salesforce.com, we can create four types of reports:Tabula reportsSummary ReportsMatrix reportJoined report11) What are some Governor limits in Salesforce?Governor limits control how much data and how many records you can store in the shared databases because Salesforce is a multi-tenant architecture based. In other words, Salesforce uses a single database to store the data of multiple customers.Salesforce introduced the concept of the Governor limits to prevent monopolization of the shared resources between users.Governor limits are the biggest challenge of a Salesforce developer. This is because if the apex code exceeds the limit, then the issue is a runtime exception that can't be handled. So as a Salesforce developer, you should be very careful while developing application.Here is a list of some significant Governor limits.Pre-transaction Apex limitsStatic Apex limitsSize-Specific Apex limitsMiscellaneous Apex limitsForce.com Platform Apex LimitsEmail limitsPush Notification limits12) What are the different ways to store various types of records in Salesforce?There are many different ways in Salesforce to store various records, such as Images, files, and documents. Some of them are as follows:AttachmentGoogle driveChatter filesLibraries13) What is the fiscal year in Salesforce?Starting and ending date of a company financial year is considered as Fiscal year. The fiscal year is used to calculate annual financial statements in business and other organizations. Salesforce has two types of the fiscal year:Standard Fiscal yearCustom Fiscal yearStandard fiscal yearSalesforce provides a calendar by default as the standard fiscal year. It's a Gregorian calendar. But it is not necessary that all the organizations use the same calendar, some organizations use different calendars and need to change the fiscal year start month. It can be defined whether the fiscal year is based on the start or end of the selected month.To set up a standard fiscal year navigate toSetup-> Administer->company profile-> Fiscal year Select the option of Standard Fiscal yearCustom fiscal yearWhen the standard fiscal year does not meet the requirements of the organization, then Custom fiscal year is used. To use the custom fiscal year, the administrator has to enable it. The administrator must define the fiscal year to fit the company's calendar.To set up the company's fiscal year, navigate toSetup-> Administer-> company profile-> Fiscal year Select the option of Custom Fiscal yearSelect the checkbox next to the terms statementClick on Enable custom fiscal yearClick on OK14) How many Master-detail relationship fields can be created in an object?There is a maximum of two Master-detail relationship fields possible in an object.15) How many Lookup relationship fields can be created in an object?There is a maximum of 40 Lookup relationship fields possible in an object.16) What are the benefits of the Salesforce?Salesforce is the largest and leading cloud platform provider in the world. Their customer relationship manager (CRM) is one of the most beneficial software.We get the following benefits by using CRMImproved understanding of the organizationEnhanced communication b/w client and service providerWe can facilitate the customer better by understanding them.Salesforce automates the repeated tasks.Salesforce reduces cost and cycle time.Salesforce improves the efficiency of teams.17) What is a sandbox org? What are the different types of sandboxes in Salesforce?A sandbox is a copy of the production org/environment. It is used for testing and development purpose. It is beneficial because it allows for the development of Apex programming without disturbing the production environment.Sandbox can be used when we want to test a newly developed force.com application. We can develop and test it in the sandbox org, there is no need to do it directly in production.There are four types of sandboxes are in Salesforce.com:DeveloperDeveloper ProPartial CopyFull18) What is Apex in Salesforce?Apex is a strongly typed object-oriented programming language. It allows developers to execute flow and transaction control statements on Salesforce server in combination with calls to the API. Its syntax looks like Java. It uses syntax and acts as a database stored procedure. Apex allows the developer to add business logic to system events like button clicks, related record update, and Visualforce pages.19) What is Visualforce?Visualforce is a framework for the Force.com platform. It is a component based markup language. It allows defining user interface component in Salesforce. Page layout feature will enable you to configure the user interface easily, but by using Visualforce pages, you can customize your user interface.20) Can you edit an apex trigger/ apex class in a production environment? Can you edit a Visualforce page in a production environment?No, we can't edit apex classes and triggers directly in the production environment.To edit an apex trigger/ class, first, it needs to be done in Developer edition or testing org or Sandbox org. Then, we can deploy it in production. A user that has apex permission must deploy the triggers and classes using deployment tools.Though, Visualforce page can be created and edited in both production and sandbox.21) Why are Visualforce pages served from a different domain?Visualforce pages are served from a different domain to block cross-site scripting and improve security standard.22) What are the static and dynamic dashboards? Can dynamic dashboards be scheduled?Static dashboards are the ordinary dashboards that will be visible to any other user who has made a report out of his data. Example; sales managers/ marketing manager would be able to see on his Salesforce Org. Moreover, a normal dashboard that shows the data for a single user.Dynamic dashboards display information which is customized for a specific user. Let's consider the above example. In case the sales manager wants to view the report of a particular team member, then he can use dynamic dashboards.We can use dynamic dashboards when we want to show user-specific data such as a particular user's quota, sales, productivity, meetings, etc.We can use a normal/ static dashboard to show regional and organization-wide data to a set of users, such as sale in a region, or team performance, etc.23) Which fields are automatically indexed in Salesforce?Following fields are automatically indexed in Salesforce:Primary keys (id, name and owner fields)Foreign keys (master-detail or lookup fields)Audit keys (Such as SystemModStamp)Custom fields ( These fields Patent as an External ID or a unique area)24) What are skinny tables?Salesforce can create skinny tables to avoid join and contain frequently used fields. Thin tables improve the performance of read-only operations. Skinny tables are set aside in sync with their source tables when the source table is modified.Contact Salesforce customer support to use skinny tables. These tables are created and used automatically where appropriate. We can't create, modify, or thin access tables.Considerations for skinny tablesIt can contain a maximum of 100 columns.Tables cannot contain fields from other objects.25) What is an Audit trail in Salesforce?The Audit trail tracks the recent setup changes that other administrators and you have made to your organization. This is useful for organizations that have more than one administrator.It can track the last twenty changes made to your organization. It displaysThe date and time of the change.Who made it (administrator name)What was before the change26) Can we delete a user in Salesforce?No, it is not possible to delete the user in the salesforce.27) Can we change the license when we create a profile?No, we cannot change the license after creating the profile.28) What is Deployment in Salesforce?In SFDC (Salesforce development cycle), you have to develop code in Sandbox, and then you might need to deploy this to another sandbox or production environment this is called deployment.In other words, the movement of metadata from one organization to another organization is called deployment. The main reason behind deployment is that you cannot develop apex in your Salesforce production.29) What are the different ways of deployment in Salesforce?Deployment can be done in the following ways.Change SetsEclipse with Force.com IDEForce.com Migration Tool - ANT/Java basedSalesforce Package30) What is the difference between a standard controller and a custom controller?The standard controller automatically contains all the standard object properties and standard button functionality. It contains all the functionalities and logic as used in standard Salesforce pages.Custom controllers are like an Apex class that implements all the logic of a page without taking an advantage of a standard controller. Custom controllers are related with Visualforce page through the controller attribute.31) What is cloud computing?Cloud computing is the provision of computational services such as storage, servers, database, software, networking, analytics, intelligence, and moreover the internet (cloud). It brings the organization faster innovation, flexibility in allocating resources, economies of scale. It reduces the costs of organizations that are associated with the task of storage.Cloud-based storage makes it possible to save the files in a remote database instead of proprietary hard drive or local storage device. It provides access to the data and the software programs to run it till an electronic accessory has access to the web.Cloud services can be both private and public. Private cloud services provide services to a certain number of people. On the other hand, public cloud services offer their services over the internet which is chargeable. These services are a group of networks that supply hosted services. Cloud services also provide a hybrid option, which combines both private and public services.32) What are the types of Cloud services?Based on services, cloud services provide users with a series of functionalities likeEmailBackup, Storage, and data retrievalCreating and testing appData AnalyzingAudio and Video streamingCloud computing is still a new service, but it comes in a trend in a very short time. Nowadays, government agencies, small businesses, non-profit agencies, and individual consumers are using cloud computing.Cloud computing is not a single part of technology like a microchip. It's a primary combination of three services software as a service (SaaS), infrastructure as a service (IaaS), and platform as a service (PaaS)33) How many certifications are available in Salesforce?There are eight kinds of certifications available in Salesforce which cater to different stages:Administrator certificationsDeveloper CertificationsArchitects CertificationsApp Builders CertificationsImplementation Experts or Consultant Certification.Marketers CertificationPardot Experts CertificationsCPQ Certification34) What is Salesforce environment?Environment or organization is the workspace for a particular user.For Example, if you sign up to a Facebook account, you will be provided a unique username and password. The same approach, if you subscribe to the Force.com cloud computing, you will be provided a valid credential to work in your specified cloud computing area of the environment or Org.The Salesforce environment provides accessibility to develop, test the apps, and can be used for production also. This environment can be customized according to your requirements such as Apex code, workflow, Custom DB attributes, and objects.35) How to check for user License in Salesforce work environment?To check the Salesforce license, open the SF workspace and navigate as follows:Setup-> Monitor->System Overview And go to Data Storage section, here you can see the user license in the highlighted area.If you want to check for all user licenses, then select the "Show All" option.36) What is MVC architecture in Visualforce?MVC is a widely used architecture design pattern which divides the design component in three phases Model, View, Controller.In Visualforce MVC, architecture can be implemented by using the standard as well as custom objects. Also, we can use three newly introduced Salesforce objects, pages, components, and controllers.These pages work like JSP pages, give the user-friendly presentation. Each view has an associated controller. Developers can write their controller using Apex programming language or can use a standard controller. VF has some auto-generated controller to interact with databases.37) When should apex be used?Apex can be used in different scenarios, such asTo create Email servicesTo create web servicesTo perform complex validation over multiple objectsTo create complex business processes that are not supported by the workflow.To create custom transaction logicTo attach custom logic to another operation38) How does Apex work?All Apex programs run on-demand exclusively on force.com platform.First, the application server compiles the apex code into an abstract set of instructions that can be understood by apex runtime interpreter.After the compilation, the compiled code is stored to metadata.And now, when the end users initiate the execution of apex by clicking the button or visual force page, the application servers retrieve the compiled instructions from the metadata and forward them to runtime interpreter before returning the result.39) What are the types of SOql statements in Salesforce?Salesforce Object Query Language is used to perform database operations in Salesforce.com. It is similar to the select statement in the widely used Structured Query Language (SQL), but it is designed especially for Salesforce data.With the use of SOql, we can create a simple but powerful query string in the following environments:In the query call () of the query String parameter.In apex statementsIn Visualforce controllers and getters methodIn the schema explorer of Force.com IDE40) What could be the reason to lose data in Salesforce?Few reasons to loss data in Salesforce are as follows:By changing date and date-timeBy migrating number, percent, currency from another datatype.By changing from the multi-select picklist, checkbox, auto number to other types.By altering the multi-select picklist from any type except picklistBy changing to auto number except for the textBy switching from text area to email, URL, phone, and text.41) What is Workflow?The workflow is a programmed process which is used to validate evaluation criteria and rule criteria.42) What is the difference between WhoID and WhatId?"WhoID" denotes the people like contacts or leads. Whereas "WhatId" denotes the objects. Let us consider LeadID, ContactID are fields of "WhoId" and AccountID, OpportunityID are "WhatId".43) What is Data Skew in Salesforce?When a maximum number of child records (more than 10k) are connected to one parent record that situation is called data skew in Salesforce.Data skew can be three typesAccount data skewOwnership skewLookup skew44) What is collection in Apex? List out all different kinds of collections supported by Salesforce?Collections in Apex are variables that are used to store multiple data records. As there is a limitation on the number of records to be retrieved per transaction, we can use the collection variable to retrieve records.There are three types of collections in Salesforce.ListMapsSets45) What are static Resources?Static resources are used to upload images, zip files, jar files, Javascript and CSS files that can be referred in a visual force page. We can upload a maximum of the 250mb file using Static resources.46) What is the difference between Action support and Action function?To understand the difference between Action support and Action function, let's understand their functionalities:Both Action support and action function are used to call a controller method via an Ajax request.The difference between them is as follows:Action function can call a controller method from JavaScript.Action function provides Ajax that supports another visualforce component and then call the controller method.Action function cannot support Ajax to another component. But from a particular component which supports Ajax (onclick, onblur, etc.) action function can be called to the controller method.47) How many types of email templates can be created in Salesforce?Different types of email templates can be created In Salesforce. Some of them are listed below.HTML with letterheadPeople who are having "Edit HTML Templates" permissions can create this template based on the letterhead.Custom HTMLPeople who are having "Edit HTML Templates" permissions can create this template without any letterhead.VisualforceOnly the administrator and developer can create this template. It provides some advanced functionalities like merging data from multiple records is available only in this template.48) How to handle comma within a field while uploading using Data Loader?If there is a comma in field content, you will have to enclose the contents within double quotation mark;" ".49) How many callouts to external service can be made in a single Apex transaction?An Apex transaction can make a maximum of 100 callouts to an HTTP request or an API call after that governor limits will restrict it.50) What is pagination in salesforce? How can we implement it in Visualforce?Pagination is a technique to display a large number of records and displaying the records on multiple pages. We use pagination instead of controlling the number of records displayed on each page.By default, a list controller shows 20 pages in a page. To customize it, we use a controller extension to set the Page Size.Take a look at the below sample code: {!opp.Name} FIRST NEXT PREVIOUS LAST
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of top frequently asked TestNG Interview Questions and answers are given below.1) What is TestNG?TestNG stands for "Testing Next Generation". It is an` automation testing framework used for java programming language developed by Credric beust, and it comes after the inspiration from the JUnit framework. TestNG consists of all the features of JUnit framework but also contains some more additional features that make TestNG more powerful.2) What are the advantages of TestNG?The following are the advantages of TestNG are:It generates the report in a proper format, which includes the following information:Number of test cases executed.Number of test cases passed.Number of test cases failed.Number of test cases skippedMultiple test cases can be grouped easily by converting them into a testng.xml file, in which you can set the priority of each test case that determines which test case should be executed first.With the help of TestNG, you can execute the multiple test cases on multiple browsers known as cross-browser testing.The TestNG framework can be easily integrated with other tools such as Maven. Jenkins, etc.Annotations used in a TestNG framework are easily understandable such as @BeforeMethod, @AfterMethod, @BeforeTest, @AfterTest.WebDriver does not generate the reports while TestNG generates the reports in a readable format.TestNG simplifies the way the test cases are coded. We do not have to write the static main method. The sequence of actions is maintained by the annotations only.TestNG allows you to execute the test cases separately. For example, if you have six test cases, then one method is written for each test case. When we run the program, five methods are executed successfully, and the sixth method is failed. To remove the error, we need to run only the sixth method, and this can be possible only through TestNG. Because TestNG generates testng-failed.xml file in the test output folder, we will run only this xml file to execute the failed test case.3) How to run the test script in TestNG?You can run the test script in TestNG by clicking right click on the TestNG class, click on "Run As" and then select "TestNG test".Play Videox4) What are the annotations used in the TestNG?The following are the annotations used in the TestNG are:Precondition annotationsPrecondition annotations are executed before the execution of test methods The Precondition annotations are @BeforeSuite, @BeforeClass, @BeforeTest, @BeforeMethod.Test annotationTest annotation is specified before the definition of the test method. It is specified as @Test.Postcondition annotationsThe postcondition annotations are executed after the execution of all the test methods. The postcondition annotation can be @AfterSuite, @AfterClass, @AfterTest, @AfterMethod.5) What is the sequence of execution of all the annotations in TestNG?The sequence of execution of all the annotations in TestNG is given below:@BeforeSuite@BeforeTest@BeforeClass@BeforeMethod@Test@AfterSuite@AfterTest@AfterClass@AfterMethod6) How to set the priorities in TestNG?If we do not prioritize the test methods, then the test methods are selected alphabetically and executed. If we want the test methods to be executed in the sequence we want, then we need to provide the priority along with the @Test annotation.Let's understand through an example.package com.javatpoint; import org.testng.annotations.Test; public class Test_methods { @Test(priority=2) public void test1() { System.out.println("Test1"); } @Test(priority=1) public void test2() { System.out.print("Test2"); } } 7) Define grouping in TestNG?The group is an attribute in TestNG that allows you to execute the multiple test cases. For example, if we have 100 test cases of it_department and 10 test cases of hr_department, and if you want to run all the test cases of it_department together in a single suite, this can be possible only through the grouping.Let's understand through an example.package com.javatpoint; import org.testng.annotations.Test; public class Test_methods { @Test(groups="it_department") public void java() { System.out.println("I am a java developer"); } @Test(groups="it_department") public void dot_net() { System.out.println("I am a .Net developer"); } @Test(groups="it_department") public void tester() { System.out.println("I am a software tester"); } @Test (groups="hr") public void hr() { System.out.print("I am hr"); } } testng.xml?xml version="1.0" encoding="UTF-8"?> 8) What is dependency in TestNG?When we want to run the test cases in a specific order, then we use the concept of dependency in TestNG.Two types of dependency attributes used in TestNG:dependsOnMethodsThe dependsOnMethods attribute tells the TestNG on which methods this test will be dependent on, so that those methods will be executed before this test method.package com.javatpoint; import org.testng.annotations.Test; public class Login { @Test public void login() { System.out.println("Login page"); } @Test(dependsOnMethods="login") public void home() { System.out.println("Home page"); } } dependsOnGroupsIt is similar to the dependsOnMethods attribute. It allows the test methods to depend on the group of test methods. It executes the group of test methods before the dependent test method.package com.javatpoint; import org.testng.annotations.Test; public class Test_cases { @Test(groups="test") public void testcase1() { System.out.println("testcase1"); } @Test(groups="test") public void testcase2() { System.out.println("testcase2"); } @Test(dependsOnGroups="test") public void testcase3() { System.out.println("testcase3"); } } 9) What is timeOut in TestNG?While running test cases, there can be a case when some test cases take much more time than expected. In such a case, we can mark the test case as a failed test case by using timeOut.TimeOut in TestNG allows you to configure the time period to wait for a test to get completely executed. It can be configured in two levels:At the suit level: It will be available to all the test methods.At each method level: It will be available to a particular test method.The timeOut attribute can be specified as shown below:@Test( timeOut = 700) The above @Test annotation tells that the test method will be given 700 ms to complete its execution otherwise it will be marked as a failed test case.10) What is invocationCount in TestNG?An invocationCount in TestNG is the number of times that we want to execute the same test.package com.javatpoint; import org.testng.annotations.Test; public class Test_cases { @Test(invocationCount=5) public void testcase1() { System.out.println("testcase1"); } } Output11) What is the importance of testng.xml file?The testng.xml file is important because of the following reasons:It defines the order of the execution of all the test cases.It allows you to group the test cases and can be executed as per the requirements.It executes the selected test cases.In TestNG, listeners can be implemented at the suite level.It allows you to integrate the TestNG framework with tools such as Jenkins.12) How to pass the parameter in test case through testng.xml file?We can also pass the value to test methods at runtime, we can achieve this by sending parameter values through the testng.xml file. We can use the @Parameter annotation:@Parameter("param-name"); Let's understand through an example:package com.javatpoint; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.Test; import org.testng.annotations.Parameters; public class Web { @Parameters({"text"}) @Test public void search() { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("http://www.google.com/"); driver.findElement(By.name("q")).sendKeys("javatpoint tutorial"); } } testng.xml file On running the testng.xml file, we get the output as shown below:13) How can we disable the test case from running?We can disable the test case from running by using the enabled attribute. We can assign the false value to the enabled attribute, in this way we can disable the test case from running.package com.javatpoint; import org.testng.annotations.Test; public class Test_cases { @Test(enabled=false) public void testcase1() { System.out.println("testcase1"); } @Test public void testcase2() { System.out.println("testcase2"); } } 14) What is the difference between soft assertion and hard assertion?Soft Assertion: In case of Soft Assertion, if TestNG gets an error during @Test, it will throw an exception when an assertion fails and continues with the next statement after the assert statement.Hard Assertion: In the case of Hard Assertion, if TestNG gets an error during @Test, it will throw an AssertException immediately when an assertion fails and stops execution after the assert statement.Let's understand through an example.package com.javatpoint; import org.testng.Assert; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; public class Assertion { SoftAssert soft_assert=new SoftAssert(); @Test public void Soft_Assert() { soft_assert.assertTrue(false); System.out.println("soft assertion"); } @Test public void Hard_Assert() { Assert.assertTrue(false); System.out.println("hard assertion"); } } Output15) What is the use of @Listener annotation in TestNG?TestNG provides different kinds of listeners which can perform different actions whenever the event is triggered. The most widely used listener in TestNG is ITestListener interface. The ITestListener interface contains methods such as onTestSuccess, onTestfailure, onTestSkipped, etc.Following are the scenarios that can be made:If the test case is failed, then what action should be performed by the listener.If the test case is passed, then what action should be performed by the listener.If the test case is skipped, then what action should be performed by the listener.Let's understand through an example.package com.javatpoint; import org.testng.Assert; import org.testng.annotations.Listeners; import org.testng.annotations.Test; @Listeners(com.javatpoint.Listener.class) public class Test_cases { @Test public void test_to_success() { Assert.assertTrue(true); } @Test public void test_to_fail() { Assert.assertTrue(false); } } Listener.javapackage com.javatpoint; import org.testng.ITestContext; import org.testng.ITestListener; import org.testng.ITestResult; public class Listener implements ITestListener { @Override public void onTestStart(ITestResult result) { // TODO Auto-generated method stub } @Override public void onTestSuccess(ITestResult result) { // TODO Auto-generated method stub System.out.println("Success of test cases and its details are : "+result.getName()); } @Override public void onTestFailure(ITestResult result) { // TODO Auto-generated method stub System.out.println("Failure of test cases and its details are : "+result.getName()); } @Override public void onTestSkipped(ITestResult result) { // TODO Auto-generated method stub System.out.println("Skip of test cases and its details are : "+result.getName()); } @Override public void onTestFailedButWithinSuccessPercentage(ITestResult result) { // TODO Auto-generated method stub System.out.println("Failure of test cases and its details are : "+result.getName()); } @Override public void onStart(ITestContext context) { // TODO Auto-generated method stub } @Override public void onFinish(ITestContext context) { // TODO Auto-generated method stub }} Output16) What is the use of @Factory annotation?The @Factory annotation is useful when we want to run multiple test cases through a single test class. It is mainly used for the dynamic execution of test cases.Let's understand through an example.testcase1.javapackage com.javatpoint; import org.testng.annotations.Test; public class Testcase1 { @Test public void test1() { System.out.println("testcase 1"); } } testcase2.javapackage com.javatpoint; import org.testng.annotations.Test; public class Testcase2 { @Test public void test1() { System.out.println("testcase 2"); } } Factory.javaimport org.testng.annotations.Factory; public class Factory1 { @Factory public Object[] getTestClasses() { Object tests[]=new Object[2]; tests[0]=new Testcase1(); tests[1]=new Testcase2(); return tests; } } 17) What is the difference between @Factory and @DataProvider annotation?@DataProvider: It is annotation used by TestNG to execute the test method multiple numbers of times based on the data provided by the DataProvider.@Factory: It is annotation used by the TestNG to execute the test methods present in the same test class using different instances of the respective class.
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of top frequently asked Informatica Interview Questions and answers are given below.1) What is Informatica? Why do we need it?Informatica is a software development firm founded in 1993 by Gaurav Dhillon and Diaz Nesamoney. Informatica is an ETL tool that offers data integration solutions. ETL tools are the tools used to extract, transform, and load the data. Therefore, we can say that Informatica is an ETL tool used to extract the data from one database and stores it in another database.Extract: The Extract is a process of extracting the data from one database. In this phase, an ETL tool extracts the data from multiple sources. Validation rules are applied to test whether they matches the expected values or not. If it fails the validation, data will be rejected.Transform: Transform is the process of converting the one form into another form in such a way the data can be placed in another database as well. Transformations include data formatting, resorting the column or row data, combining the two values into one and splitting the data into two or three values.Load: In the load phase, data is moved to the target database. Once the data is loaded, the ETL process is completed.2) What are the popular Informatica products?The following are the popular Informatica products:Power CenterPower MartPower ExchangePower Center ConnectPower ChannelMetadata ExchangePower AnalyzerSuper Glue3) What is Informatica PowerCenter?Informatica PowerCenter is an ETL tool used to build the enterprise data warehouses. It is highly available, fully-scalable, and high performing tool.Play VideoxIt provides reliable solutions to the IT management team as it delivers not only data to meet the operational and analytical requirements of the business, but also supports various data integration projects4) What is a data warehouse?The data warehouse is a technique of integrating data from multiple sources. It involves analytical reporting, data integration, data cleaning, and data consolidations.A data warehouse is mainly designed for query and data analysis purpose instead of transaction processing.It is used to transform the information into useful data whenever the user required.The data warehouse is an environment, not a product that provides the current and historical decision support information to the users, which is not possible to access the traditional operational database.The data which is processed and transformed in the data warehouse can be accessed by using the Business Intelligence tools, SQL Clients, and spreadsheets.5) How can Informatica be used for an organization?Informatica in an organization can be used in the following ways:Data Migration: Data Migration means transferring the data from the traditional system to a new database system.Data Warehousing: Informatica is an ETL tool used for moving the data from the database or production system to the data warehouse. This process is known as Data Warehousing.Data Integration: Data Integration means integrating the data from multiple sources or file-based systems. For example, cleaning up the data.6) Explain the Informatica workflow?Informatica workflow is a collection of tasks which are connected with the starting task and triggers the proper sequence to execute the process.Workflow is created either manually or automatically by using the workflow designer tool.7) Mention some types of transformation?8) What is the difference between active and passive transformation?An active transformation is a transformation that changes the number of rows when the source table is passed through it. For example, Aggregator transformation is a type of active transformation that performs the aggregations on groups such as sum and reduces the number of rows.A passive transformation is a transformation that does not change the number of rows when the source data is passed through it, i.e., neither the new rows are added, nor existing rows are dropped. In this transformation, the number of output and input rows are the same.9) Explain the difference between a data warehouse and a data mart?Data warehouse and Data mart are the structured repositories that store and manage the data. A data warehouse is used to store the data centrally for the entire business while data mart is used to store the specific data, not the entire business data. Querying the data from the data warehouse is a very tedious task, so data mart is used. The data mart is a collection of smaller sets of data which allows you to access the data faster and efficiently.10) What is repository manager?A repository is a place or a relational database used to store the information or metadata. Metadata can include various information such as mappings that describes how to transform the data, sessions describe when you want the Informatica server to perform the transformations, also stores the administrative information such username and password, permissions and privileges, and product version. The repository is created and maintained by the Repository Manager client tool.Repository Manager is a manager that manages and organizes the repository. Repository Manager can create the folders to organize the data and groups to handle multiple users.11) What is mapping?Mapping is a pipeline or structural flow of data that describes how data flows from source to the destination through transformations.Mapping consists of the following components:Source Definition: Source Definition defines the structure and characteristics of the source such as data types, type of the data source, etc. You can create more than one source definitions by using the Informatica Source Analyzer.Target Definition: Target Definition defines the final destination or target where the data will be loaded.Transformation: Transformation defines how source data should be transformed, and various functions are applied during the transformation process.Links: Links define how data should flow from source definition to the target table by performing different transformations.12) What is session?A session is a property in Informatica that have a set of instructions to define when and how to move the data from the source table to the target table.A session is like a task that we create in workflow manager. Any session that you create must have a mapping associated with it.Session must have a single mapping at a time, and it cannot be changed.In order to execute the session, it must be added to the workflow.A session can either be a reusable or non-reusable object where reusable means that we can use the data for multiple rows.13) What is Designer?A designer is a graphical user interface that builds and manage the objects like source table, target table, Mapplets, Mappings, and transformations.Mapping in Designer is created by using the Source Analyzer to import the source table, and target designer is used to import the target table.Designer components:Designer contains multiple components:NavigatorNavigator is used to perform the following activities:It is used to connect with Repository service.It is used to open folders.It is used to copy objects and to create the shortcuts.WorkspaceWorkspace is a space where we do the coding.In a workspace, we can create as well as edit the repository objects such as sources, targets, mapplets, mappings, and transformations.ToolbarDifferent components in the toolbar are available such as Repository, edit, tools, versioning, windows, and help.Output/Control panelIt displays the output about the task that we perform in designer such as mapping is valid or not, is mapping saved or not, and it also displays the errors.Status barThe status bar displays the status of the current operation.14) What is domain?The domain is a collection of nodes (machines) and services, i.e., repository service, integration service, nodes, etc.It is an administrative unit from where you manage or control things such as configurations, users, security.The domain is an environment where you can have a single domain as well as multiple domains. For example, we have three departments such as development, test, and production; then we will have a domain for each department, i.e., we have three domains.15) What is Workflow Manager?Workflow Manager is used to create Workflow and Worklet.WorkflowWorkflow is a set of instructions used to execute the mappings.The workflow contains various tasks such as session task, command task, event wait task, email task, etc. which are used to execute the sessions.It is also used to schedule the mappings.All the tasks are connected to each other through links inside a workflow.After creating the workflow, we can execute the workflow in the workflow manager and monitor its progress through the workflow monitor.WorkletWorklet is an object that groups a set of tasks which can be reused in multiple workflows.A worklet is similar to a workflow, but it does not have any scheduling information.In worklet, you can group the tasks in a single place so that it can be easily identified.16) What is Workflow Monitor?Workflow Monitor is used to monitor the execution of workflows or the tasks available in the workflow. It is mainly used to monitor the progress of activities such as Event log information, a list of executed workflows, and their execution time.Workflow Monitor can be used to perform the following activities:You can see the details of executionYou can see the history of workflow executionYou can stop, abort, or restart the workflows.It displays the workflows that have been executed at least once.It consists of the following windows:Navigator window: It displays the repositories, servers, and repositories objects that have been monitored.Output window: It displays messages coming from the Integration service and Repository service.Time window: It displays the progress of workflow execution.Gantt Chart view: It displays the progress of the workflow execution in a tabulated form.Task view: It displays the details about the workflow execution in a report format.17) Explain the types of transformations?Transformations are used to transform the source data into target data. It ensures that the data will be loaded to the target database based on the requirements of the target system.A transformation is basically a repository object that can read, modify, and passes the data from source to the target.There are two types of transformations:Active transformationActive transformation is a transformation which can modify the number of rows that passes from source to the target, i.e., it can eliminate the rows that do not meet the condition in transformation.Passive transformationPassive transformation is a transformation that does not eliminate the number of rows, i.e., all the data passes from source to the target without any modification.18) What is SQ transformation?SQ stands for Source Qualifier transformation that selects the records from multiple sources, and the sources can be relational tables, flat files, and Informatica PowerExchange services.It is an active and connected transformation.When you add the source tables in mapping, then Source Qualifier is added automatically.It displays the transformation types, i.e., it converts the source datatypes into an Informatica compatible datatypes.In the case of SQ transformation datatypes, source datatype does not match with the Informatica compatible datatype then the mapping will become invalid when you save it.SQ transformation is an active transformation as you can apply all the business rules and filters to overcome the performance issue.By using SQ transformation, you can apply filters on the data by applying joins on the tables.Source Qualifier transformation can also join homogeneous tables, i.e., data originating from the same database into a single SQ transformation.Following are the properties of SQ transformation:User Defined SQL QueryUser Defined JoinsAdd/Modify WHERE clause using FilterAdd/Modify ORDER BY sorted portsSelect Unique/Distinct rows19) What is an Expression Transformation?Expression Transformation is a passive and connected transformation.It is used to manipulate the values in a single row.Examples of expression transformation are concatenating the first name and last name, adjusting the student records, converting strings to date, etc.It also checks the conditional statements before passing the data to other transformations.Expression transformation uses numeric and logical operatorsFollowing are the operations performed by the expression transformer are:Data manipulationIt performs operations such as concatenation, truncation, and round.Datatype conversionIt can also convert one data type into another data type.Data cleansingIt checks for nulls, test for spaces, test for numbers.Manipulate datesIt can also manipulate the dates.Scientific calculations and numerical operationsIt also performs the exponential, log, modulus, and power operations.There are three types of ports used in Expression Transformation:InputAn input port consists of values which are used in the calculation. For example, we need to calculate the total salary; then it will be calculated only when we know the salary and incentives of an employee.OutputWe provide expression to each output port, and the return value of the output port should match the return value of the expression.VariableIt is a temporary variable used in the calculation.20) What is a Sorter Transformation?It is an active and connected transformation.It is used to sort the data either in ascending or in descending order, similar to the ORDER BY clause in SQL.It is also used in case-sensitive sorting, and also used to specify whether the output rows should be distinct or not.Sorter transformation is an active transformation as it eliminates duplicates.Properties of Sorter Transformation:Sorter cache sizeAn integration service uses sorter cache size property to determine the maximum amount of memory required to perform the sort operation.Case SensitiveYou can also enable the case-sensitive property; in such case, an integration service will give more priority to the uppercase characters than lowercase characters.Work directoryWork directory is a directory where integration service creates temporary files while sorting the data. When data is sorted, then all the temporary files will be removed from the work directory.Distinct Output RowsThis property is used by the integration service to produce the distinct output rows.Tracing LevelThe tracing level is a property that controls the number, type of sorter error, and status messages that integration service writes to the session log.Null Treated LowEnable this property when you want integration service treat null value lower than other value. Disable this property when you want to treat the null value higher than the other value.21) What is an Aggregator Transformation?Aggregator transformation is a connected and active transformation.It is used to perform aggregate functions over a group of rows such as sum, average, count, etc., similar to the aggregate functions in SQL such as sum(), avg(), count(), etc.For example, if you want to calculate the sum of the salary of all the employees, then an aggregator transformation is used.Aggregator transformation uses the temporary main table to store all the records, and perform the calculations.Components of Aggregator transformation:Aggregate cacheAn integration service uses the aggregate cache to store the data until the aggregate calculation is completed. It stores the group values in index cache and row data in the data cache.Aggregate expressionAn aggregate expression is provided to the output port and output port can also contain non-aggregate expressions and conditional clauses.Group by portThis property is used to create the groups. Groups can be input, output, or any variable port.Sorted inputSorted input property is used to improve the session performance. In order to use sorted input, you need to pass the data to aggregator transformation sorted by group by port either in ascending or in descending order.22) What is a Filter Transformation?Filter transformation is an active and connected transformation.It filters out the rows which are passed through it, i.e., it changes the number of rows which are passed through.It applies the filter condition on the group of data. This filter condition returns an either true or false value. If the value is true means that the condition is satisfied, then data is passed through, and if the value is false means that the filter condition is not satisfied, then integration service drops the data and writes the message to the session log.23) What is a Joiner Transformation?Joiner Transformation is an active and connected transformation.It allows you to create the joins in Informatica, similar to the joins that we create in database.In joiner transformation, joins are used for two sources and these sources are:Master sourceDetail sourceIn joiner transformation, you need to choose which data source will be Master, and which data source will be Detail.There are four types of joins used in a joiner transformation:Master outer joinIn Master outer join, the resultset contains all the records from the Detail source and the matching rows in the master source. This join will be similar to the Right join in SQL.Detail outer joinIn Detail outer join, the resultset contains all the records from the Master source and the matching rows in the Detail source. This join will be similar to the Left join in SQL.Full outer joinIn Full outer join, the resultset contains all the records from both the sources, i.e., Master and Detail source.Normal joinIn Normal join, the resultset contains only the matching rows between Master and Detail source. This join is similar to the inner join in SQL.24) What is a Router Transformation?Router transformation is an active and connected transformation.Router transformation is similar to the filter transformation as both the transformations test the input data based on the filters.In Filter transformation, you can apply only one filter or condition, and if the condition is not satisfied, then a particular is dropped. But in Router transformation, more than one condition can be applied. Therefore, we can say that the single input data can be checked on multiple conditions.25) What is Rank Transform?Rank transformation is an active and connected transformation.It filters the data based on groups and ranks.For example, if you want to get top 3 salaried employees department wise, then this will be achieved by the rank transformation.Rank transform contains an output port which assigns a rank to the rows.26) What is a Sequence Generator Transformation?Sequence Generator transformation is a passive and connected transformation.It is a type of transformation that generates numeric values.It creates unique primary key values, replaces missing primary keys, or cycle through a sequential range of numbers.27) What is a Stored Procedure Transformation?It is a passive transformation.It can be used in both connected and unconnected mode.Informatica contains the stored procedure transformation which is used to run the stored procedures in the database where stored procedures are pre-compiled PL-SQL statements, and these pre-compiled statements are executed using Execute or Call statements.There are three types of data that can be passed between the integration service and stored procedure:Input/Output parametersIt is used to send or receive the data from the stored procedure.Return valuesOn running a stored procedure, it returns a single value, and the value can be user-definable, single output value or only a single integer value. If the stored procedure returns resultset, then stored transformation accepts the only first value of the resultset.Status codesStored procedure transformation provides a status code that notifies whether the stored procedure has been completed successfully or not.28) What is lookup Transformation?Lookup transformation is active as well as passive transformation.It can be used in both connected and unconnected mode.It is used to look up the data in a source, source qualifier, flat file, or a relational table to retrieve the data.We can import the definition of lookup from any flat file or relational database, and an integration service queries the lookup source based on the ports, lookup condition and then returns the result to other transformations.Lookup transformation can be in two modes:Lookup tableThe Lookup table is imported either from the mapping source or target database using the Informatica client and server.Lookup conditionLookup condition determines whether the input data satisfies the value in the lookup table or not.The following are the activities performed by the lookup transformation:Get a Related valueIt can be used to retrieve the value from the lookup table based on the value available in the source table. For example, we want to retrieve the student name from the lookup table based on the student id in the source table.Get multiple valuesIt can also be used to retrieve the multiple rows from a lookup table. For example, we want to retrieve all the students branch wise.Perform a calculationIt can used to retrieve the value from a lookup table and can perform the calculation on it. For example, retrieve the marks of students and then calculate their percentages.Update slowly changing dimension tablesIt determines whether the rows exist in a target table or not.29) What is Union transformation?Union transformation is an active transformation.It is similar to the SQL Union All, i.e., it combines the data from the multiple files and produces the single output and then store it in the target table.Guidelines of Union transformationUnion transformation contains multiple output groups, but one input group.It does not remove duplicates from the input source. To overcome this issue, we use the sorter transformation in which we use the select distinct statement to remove the duplicate rows.It does not generate any transaction.You cannot connect to a sequence generator transformation to generate the sequences.30) What is Update Strategy transform?It is an active and connected transformation.This type of transformation can be used to insert, update, or delete the records from the target table.It can even reject all the records to avoid reaching to the target tableThe design of the target table depends on how the changes are made in the existing row. An update strategy transform works in two levels:Session levelWhen we configure the session, we can either instruct the integration service to treat all the rows in the same way, i.e., treat all rows as insert/delete/update, or you can use the instruction coded in session mapping to flag rows for performing different database operations.Mapping levelWithin mapping, you can apply update strategy transformation to flag rows either for insert, update, delete, or reject.31) What are the tasks that can be performed using SQ?The following are the tasks performed by using SQ:JoinsYou can join two or more tables belonging to the same database, and by default, all the tables are joined by using the primary key and foreign key relationship. We can also explicitly specify the join condition in user-defined join property.Filter rowsYou can also filter the rows. An integration service adds a WHERE clause to filter the rows.Sorting inputYou can also sort the input data by specifying the numbers of sorted inputs. An integration service uses the ORDER BY clause by default to sort the input data.Distinct rowsYou can also select the distinct rows from the source table by selecting the Select Distinct property; then integration service will add the Select Distinct statement to the default SQL query.Custom SQL QueryYou can also write your own queries to perform the calculations on the source data.
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
Here, we are giving the most relevant Agile Scrum interview questions with answers and hope these questions will help you while preparing for the agile scrum interview.1) What is an agile or agile methodology?Agile is an iterative approach of software development methodology using short iterations of 1 to 4 weeks. Due to the agile methodology, the development process is aligned to deliver the changing business requirement.2) What are some quality strategies of agile?Some quality strategies of agile are:IterationRe-factoringDynamic code analysisShort feedback cyclesReviews and inspectionStandards and guidelinesMilestone reviews3) What are an agile manifesto and its principle?Agile manifesto uncovers the better way of developing software by doing it and helping others to do it. Agile has 4 manifesto and 12 principles which defines:Individuals and interactions, i.e., self-motivating and self-organized should be encouraged.Demonstrate the working software at regular intervals with comprehensive documentation.Customers are collaboration over contact negotiation.Responding to change over following a plan.The principles of agile manifesto are-Customer Satisfaction: Manifesto provides high priority to satisfy the costumer's requirements. Customer satisfaction is done through early and continuous delivery of valuable software.Welcome Change: Making change during software development is common and inevitable. Every changing requirement should be welcome, even in the late development phase. Agile process is used to increase the customer's competitive advantage.Deliver the Working Software: Deliver the working software frequently, ranging from a few weeks to a few months with considering the shortest period.Read more4) Is there any disadvantage of the agile model (SDLC)?Disadvantages of Agile SDLC:The development team should be highly professional and client-oriented.New requirement may be a conflict with the existing architecture.With further correction and change, there may be chances that the project will cross the expected time.There may be difficult to estimate the final coast of the project due to constant iteration.A defined requirement is absent.Read more5) What are the burn-up and burn-down chart?The burn-up chart depicts the amount of work done in the project, whereas the burn-down chart illustrates the amount of work remaining in the project. Thus, the burn-up and burn-down are used to describe the progress report of the project.6) What do you understand by Daily Stand-Up?The daily stand-up is the day-to-day meeting (mostly in the morning) in which the whole team meets around 15 minutes to find the answer for the following three questions:What was done yesterday?What is your plan for today?Is there any obstacle that restricts you to complete your task?7) What do you understand about Scrum?Scrum is a framework that helps agile teams work together to develop, deliver, and sustain the complex product in the shortest time. The product provides by scrum team in this shortest period is known as a sprint.8) What are the different roles in Scrum?There are three different roles in scrum. These are the Scrum Master, Product Owner, Agile Development Team:Scrum Master: The Scrum Master is a team leader and facility provider who help the team member to follow agile practices so that they can meet their commitments and customers requirements.Product Owner: The Product Owner is one who runs the product from a business perspective. He defines the requirements and prioritizes their values.Agile Development Team: Agile development team provides the judgment on the technical feasibilities or any dependencies.9) What are the responsibilities of the Scrum Master?The critical responsibility of Scrum Master includes:Tracking and monitoring project development.Understanding the user requirement correctly.Work to obtain the project properly.Improving the performance of the team.Organized meetings and resolve issues.Communicate and report to the customer and development team.10) What are different ceremonies and their importance in Scrum?To clearly express the Scrum planning, Scrum review, Scrum Daily stand up, and scrum retrospective is the purpose of the ceremony. The importance of these ceremonies is to use sprint as per your project.11) What do you know about Scrum ban?Scrum-ban is a Scrum and Kanban-based model for software development. This model is used in the project that needs continuous maintenance, various programming error, or some sudden changes.12) What do you understand by the term agile testing?The agile testing is the software testing process which is fully based on the principle of agile software development. It is the iterative approach where the user story becomes the output of the collaboration between the product owner and the development team.13) What are the major principles of agile testing?Some of the essential principles of agile testing are:Customer satisfactionFace to face communicationSustainable developmentContinuous feedbackQuick respond to changesSuccessive improvementSelf-organizedFocus on essenceError-free clean nodeCollective work14) What are the skills of a good agile tester?The agile tester is one who implements the principle of agile software development principles for software testing. An excellent agile tester has the following skills:He must be familiar with the principles and concept of agile.He must be excellent communication skill to communicate with the team and the clients.He can set the priority of a task according to customer requirements.He should able to understand the customer requirement properly.He should understand the project risk due to changing demand.15) Name the agile frameworks.Some of the agile frameworks are:ScrumKanbanFeature Driven DevelopmentTest Driven Development16) Is it ever suggested to use waterfall over Scrum? If yes, explain when.Yes, sometimes we use waterfall module over scrum. This is because when the client requirement is simple, small, well-defined, fully understood, predictable, and the subject does not change until the project complete.17) Name some methodologies and development where you have used the agile model.While answering this type of question, keep in mind to mention those methodologies from which you are familiar whit. Some of the methodologies where agile is used are:Crystal methodologiesLean software developmentDynamic developmentFeature-driven development18) What was the length of sprints/iterations in your project?It is a common question for experienced people. The idea behind is to judge in which kind of environment you have worked? There will be follow up of the question that the length fixed in the beginning and never changed? Did you try with less than this length or more than that?19) What is the difference between the agile & traditional way of working?The traditional way of development is that which follow the sequential where design -> development -> testing etc. is performed whereas, in agile development, all of this is done in every iteration/sprint.20) Why does Scrum encourage the use of automated testing for projects?Due to faster possible delivery of the project, the Scrum development encourages to use automated (automated performance or automated regression) testing. While answering this question, you should explain some tools that you have used for automated testing.
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of frequently asked machine learning interview questions and answers are given below.1) What do you understand by Machine learning?Machine learning is the form of Artificial Intelligence that deals with system programming and automates data analysis to enable computers to learn and act through experiences without being explicitly programmed.For example, Robots are coded in such a way that they can perform the tasks based on data they collect from sensors. They automatically learn programs from data and improve with experiences.2) Differentiate between inductive learning and deductive learning?In inductive learning, the model learns by examples from a set of observed instances to draw a generalized conclusion. On the other side, in deductive learning, the model first applies the conclusion, and then the conclusion is drawn.Play VideoxInductive learning is the method of using observations to draw conclusions.Deductive learning is the method of using conclusions to form observations.For example, if we have to explain to a kid that playing with fire can cause burns. There are two ways we can explain this to a kid; we can show training examples of various fire accidents or images of burnt people and label them as "Hazardous". In this case, a kid will understand with the help of examples and not play with the fire. It is the form of Inductive machine learning. The other way to teach the same thing is to let the kid play with the fire and wait to see what happens. If the kid gets a burn, it will teach the kid not to play with fire and avoid going near it. It is the form of deductive learning.3) What is the difference between Data Mining and Machine Learning?Data mining can be described as the process in which the structured data tries to abstract knowledge or interesting unknown patterns. During this process, machine learning algorithms are used.Machine learning represents the study, design, and development of the algorithms which provide the ability to the processors to learn without being explicitly programmed.4) What is the meaning of Overfitting in Machine learning?Overfitting can be seen in machine learning when a statistical model describes random error or noise instead of the underlying relationship. Overfitting is usually observed when a model is excessively complex. It happens because of having too many parameters concerning the number of training data types. The model displays poor performance, which has been overfitted.5) Why overfitting occurs?The possibility of overfitting occurs when the criteria used for training the model is not as per the criteria used to judge the efficiency of a model.6) What is the method to avoid overfitting?Overfitting occurs when we have a small dataset, and a model is trying to learn from it. By using a large amount of data, overfitting can be avoided. But if we have a small database and are forced to build a model based on that, then we can use a technique known as cross-validation. In this method, a model is usually given a dataset of a known data on which training data set is run and dataset of unknown data against which the model is tested. The primary aim of cross-validation is to define a dataset to "test" the model in the training phase. If there is sufficient data, 'Isotonic Regression' is used to prevent overfitting.7) Differentiate supervised and unsupervised machine learning.In supervised machine learning, the machine is trained using labeled data. Then a new dataset is given into the learning model so that the algorithm provides a positive outcome by analyzing the labeled data. For example, we first require to label the data which is necessary to train the model while performing classification.In the unsupervised machine learning, the machine is not trained using labeled data and let the algorithms make the decisions without any corresponding output variables.8) How does Machine Learning differ from Deep Learning?Machine learning is all about algorithms which are used to parse data, learn from that data, and then apply whatever they have learned to make informed decisions.Deep learning is a part of machine learning, which is inspired by the structure of the human brain and is particularly useful in feature detection.9) How is KNN different from k-means?KNN or K nearest neighbors is a supervised algorithm which is used for classification purpose. In KNN, a test sample is given as the class of the majority of its nearest neighbors. On the other side, K-means is an unsupervised algorithm which is mainly used for clustering. In k-means clustering, it needs a set of unlabeled points and a threshold only. The algorithm further takes unlabeled data and learns how to cluster it into groups by computing the mean of the distance between different unlabeled points.10) What are the different types of Algorithm methods in Machine Learning?The different types of algorithm methods in machine earning are:Supervised LearningSemi-supervised LearningUnsupervised LearningTransductionReinforcement Learning11) What do you understand by Reinforcement Learning technique?Reinforcement learning is an algorithm technique used in Machine Learning. It involves an agent that interacts with its environment by producing actions & discovering errors or rewards. Reinforcement learning is employed by different software and machines to search for the best suitable behavior or path it should follow in a specific situation. It usually learns on the basis of reward or penalty given for every action it performs.12) What is the trade-off between bias and variance?Both bias and variance are errors. Bias is an error due to erroneous or overly simplistic assumptions in the learning algorithm. It can lead to the model under-fitting the data, making it hard to have high predictive accuracy and generalize the knowledge from the training set to the test set.Variance is an error due to too much complexity in the learning algorithm. It leads to the algorithm being highly sensitive to high degrees of variation in the training data, which can lead the model to overfit the data.To optimally reduce the number of errors, we will need to tradeoff bias and variance.13) How do classification and regression differ?ClassificationRegressionClassification is the task to predict a discrete class label.Regression is the task to predict a continuous quantity.In a classification problem, data is labeled into one of two or more classes.A regression problem needs the prediction of a quantity.A classification having problem with two classes is called binary classification, and more than two classes is called multi-class classificationA regression problem containing multiple input variables is called a multivariate regression problem.Classifying an email as spam or non-spam is an example of a classification problem.Predicting the price of a stock over a period of time is a regression problem.14) What are the five popular algorithms we use in Machine Learning?Five popular algorithms are:Decision TreesProbabilistic NetworksNeural NetworksSupport Vector MachinesNearest Neighbor15) What do you mean by ensemble learning?Numerous models, such as classifiers are strategically made and combined to solve a specific computational program which is known as ensemble learning. The ensemble methods are also known as committee-based learning or learning multiple classifier systems. It trains various hypotheses to fix the same issue. One of the most suitable examples of ensemble modeling is the random forest trees where several decision trees are used to predict outcomes. It is used to improve the classification, function approximation, prediction, etc. of a model.16) What is a model selection in Machine Learning?The process of choosing models among diverse mathematical models, which are used to define the same data is known as Model Selection. Model learning is applied to the fields of statistics, data mining, and machine learning.17) What are the three stages of building the hypotheses or model in machine learning?There are three stages to build hypotheses or model in machine learning:Model buildingIt chooses a suitable algorithm for the model and trains it according to the requirement of the problem.Applying the modelIt is responsible for checking the accuracy of the model through the test data.Model testingIt performs the required changes after testing and apply the final model.18) What according to you, is the standard approach to supervised learning?In supervised learning, the standard approach is to split the set of example into the training set and the test.19) Describe 'Training set' and 'training Test'.In various areas of information of machine learning, a set of data is used to discover the potentially predictive relationship, which is known as 'Training Set'. The training set is an example that is given to the learner. Besides, the 'Test set' is used to test the accuracy of the hypotheses generated by the learner. It is the set of instances held back from the learner. Thus, the training set is distinct from the test set.20) What are the common ways to handle missing data in a dataset?Missing data is one of the standard factors while working with data and handling. It is considered as one of the greatest challenges faced by the data analysts. There are many ways one can impute the missing values. Some of the common methods to handle missing data in datasets can be defined as deleting the rows, replacing with mean/median/mode, predicting the missing values, assigning a unique category, using algorithms that support missing values, etc.21) What do you understand by ILP?ILP stands for Inductive Logic Programming. It is a part of machine learning which uses logic programming. It aims at searching patterns in data which can be used to build predictive models. In this process, the logic programs are assumed as a hypothesis.22) What are the necessary steps involved in Machine Learning Project?There are several essential steps we must follow to achieve a good working model while doing a Machine Learning Project. Those steps may include parameter tuning, data preparation, data collection, training the model, model evaluation, and prediction, etc.23) Describe Precision and Recall?Precision and Recall both are the measures which are used in the information retrieval domain to measure how good an information retrieval system reclaims the related data as requested by the user.Precision can be said as a positive predictive value. It is the fraction of relevant instances among the received instances.On the other side, recall is the fraction of relevant instances that have been retrieved over the total amount or relevant instances. The recall is also known as sensitivity.24) What do you understand by Decision Tree in Machine Learning?Decision Trees can be defined as the Supervised Machine Learning, where the data is continuously split according to a certain parameter. It builds classification or regression models as similar as a tree structure, with datasets broken up into ever smaller subsets while developing the decision tree. The tree can be defined by two entities, namely decision nodes, and leaves. The leaves are the decisions or the outcomes, and the decision nodes are where the data is split. Decision trees can manage both categorical and numerical data.25) What are the functions of Supervised Learning?ClassificationSpeech RecognitionRegressionPredict Time SeriesAnnotate Strings26) What are the functions of Unsupervised Learning?Finding clusters of the
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
A list of frequently asked API Testing interview questions and answers are given below.1) What is API?API (Application Programming Interface) helps in communication and data exchange between two software systems. API act as an interface between two applications and allows the two software systems communicate with one another. API is a collection of functions which can be executed by another software program.API works as; it takes a request from the source, takes that request to the database, fetches the request data from the database and returns a response to the source. API takes the requests from the user and gives the response without exposing the internal details. API acts as Abstraction.Example: Amazon API, Google Map APIPlay Videox2) What is API testing?API testing is a type of software testing that involves testing APIs directly. API is a part of integration testing to check whether the API meets expectations in terms of functionality, reliability, performance, and security of applications. Multiple API system can performed API testing. In API testing, our primary focus is on Business Logic Layer of the software architecture.3) What are the types of API testing?API testing involves the following types of testing:Unit TestingFunctional TestingLoad TestingRuntime/Error DetectionSecurity TestingUI TestingInteroperability and WS compliance TestingPenetration TestingFuzz Testing4) What are the protocols used in API Testing?Protocols used in API testing are:HTTPRESTSOAPJMSUDDI5) What are the tools used for API Testing?Tools used for API testing are:Parasoft SOAtestPostManAlertSite API monitoring6) What is API test environment?For API the test environment is a quite complex method where the configuration of server and database is done as per the requirement of the software application. API testing does not involve graphical user interface (GUI).API is checked for its proper functioning after installation.7) What is API framework?API framework is described by the config. File which consist of the list of all APIs that are required to be activated and are activated for any particular program run. This is essential as every test run does not require all APIs.8) What are the limits of API usage?Many APIs have certain limit set up by the provider. Hence, try to estimate our usage and understand how that will impact the overall cost of the offering.9) What are the advantages of API testing?Advantages of API testing are:Test for core functionality: API testing provides access to the application without the user interface. The core functionality of the application will be tested before the GUI tests. This will help to detect the minor issue which can become bigger during the GUI testing.Time effective: API testing is less time consuming than GUI testing. Particularly, API test requires less code so it can provide better and faster test coverage compare to GUI test automation. This will reduce the cost for the testing project.Language Independent: In API testing data is exchange using XML or JSON. These transfer mode are completely language-independent, which allows users to select any code language when adopting automation test service for the project.Easy Integration with GUI: API tests provide highly integrable tests which is useful to perform functional GUI tests after GUI tests. Simple integration would allow new user accounts to be created within the application before GUI started.10) What are the principles of an API test design?Here, are the seven principles of API test design.Exhaustive Testing: Exhaustive testing is not possible. Instead we need optimal amount of testing which is based on the risk assessment of the application.Defect Clustering: Defect Clustering states that a small number of modules contain the most of the defect detected. Approximately 80% of the defect found in 20% of the modules. By experience we can identify such risky modules. But this approach has its own problems. If the same tests are repeated over and over again, eventually the same test case will no longer find new bugs.Pesticide Paradox: Testers cannot depend on existing technique. They must have to look continually to improve the existing method to make testing more effective. But even all these hard work in testing we can never claim our product is bug free. To overcome this, test cases need to be regularly reviewed and revised add new and different test cases to help find more defects.Testing shows presence of defects: Testing principle states that- testing talks about the presence of defects not about the absence of defect. Software testing reduces the probability of undiscovered defects remaining in the software but even if no defects found, it is not a proof of correctness.But if we work hard, taking all precautions and make our software products 99% bug free. The software does not meet the needs and requirements of the client.Absence of error -fallacy: This can be possible the software which is 99% bug free is still unusable. The case can be if the system is tested for the wrong requirement. Software testing is not finding the defects but also to check that software addresses the business needs. The absence of error is fallacy i.e. finding and fixing defects does not help if the system build is unusable and doesn't fulfill the user's needs and requirements.Early Testing: Testing should start as soon as possible in the software development lifecycle. So that defects in the requirement or design phase captured in the early stages. It is cheaper to fix defect in the early stages of testing. We should start finding the bug at the moment the requirements are defined.Testing is context dependent: Testing is context dependent that we test an e-commerce site will be different from the way we test the commercial. All the developed software's are not identical. We will use different methodology; techniques and type of testing depend on the application type.11) What is API framework?A framework or software framework is a platform for developing software applications. API framework is a foundation on which software developer can build applications for a specific platform.Example: A framework can include predefined classes and functions that can be used to process input, manage hardware devices and interact with system software.Framework is similar to an Application Programming Interface, technically framework includes API. Framework serves foundation for programming while API provides access to the elements supported by the framework. Framework also includes code libraries, compiler and other programs used in the software development process.API framework is defined by configuration file which consists the list of all APIs that is required to be activated and activated for a particular program run.12) What are the common tests that performed on API?Here, are the common tests that performed on API are as:Response of the API should be verified based on the request. We will verify that the return value is based on request.When API is updating any data structure we should verify the system is authenticating the outcome.We will verify whether the API is trigger other event or request another API.We will verify the behavior of the API when no value is return.13) What exactly needs to verify in API testing?In API testing, we send a request to API with the known data and then analysis the response.We will verify the accuracy of the data.Will see the HTTP status code.We will see the response time.Error codes in case API returns any errors.Authorization would be check.Non-Functional testing such as performance testing, security testing.14) What are the differences between API and Web Services?Sr. No.APIWeb Services1.API may or may not need network for its operations.Web Services always need network for its operation.2.API can be communicated through SOAP, REST, XML-RPC and CURL calls as well.API can also be exposed in number of ways like JAR, DLL, XML over HTTP, JSON over HTTP etc.Web service can be communicated through SOAP, REST, AND RPC.3.API can perform all the operations which web service can't perform.Web service can't perform all the operations like API.4.All APIs are not web service.All web services are API15) What is API documentation?A good documentation is must for any foundation. API documentation serves as quick reference for accessing library or working within a program.When we use any such documents, it must consists of proper plan, content source, proper layout, information related to each function etc.There are various documentation tools like Doxygen and JavaDoc. Here, are the functions which are documented which revolve around the parameters like:Function descriptionType and syntax of error message that may occureSyntax, elements and sequence needed for each parameterLinks regarding functions16) What is the most used template for API documentation?Here, are the various documentation template that make the whole process simple and easy. They are:SwaggerMiredotSlateFlatDocAPI blueprintRestDocWeb service API specification17) What are the types of bug that can be found during API testing?API testing helps us to find many types of bugs which are:StressSecurityDuplicate or missing functionalityReliabilityUnused flagsPerformanceIncompatible error handlingMulti-threaded issueImproper errors18) What are the difference between API testing and UI testing?UI (User Interface) testing means the testing of the graphical user interface. The focus of UI testing is on the look and feel of the application. In user interface testing the main focus is on how users can interact with app elements such as images, fonts, layout etc. are checked.API testing allows the communication between two software systems. API testing works on backend also known as backend testing.19) What is SOAP?SOAP (Simple Object Access Control) . It is an XML based protocol that helps in exchanging information among computers.20) What is REST API?REST API is a set of function helps the developers performing requests when the response is receiving. Through HTTP protocol interaction is made in REST API.REST is defined as Representational state transfer. It is an effective standard for API creation.21) What are the differences between SOAP and REST API?Sr. No.SOAP APIREST API1.SOAP stands as Simple Object Access Protocol.REST stands as Representational State Transfer.2.SOAP is a protocol.REST is an architectural pattern.3.SOAP can work with XML format. In SOAP all the data passed in XML format.REST permit different data format such as Plain text, HTML, XML, JSON etc. But the most preferred format for transferring data is in JSON.22) What are the major challenges faced during API testing?The major challenges faced during the API testing are:Parameter SelectionParameter CombinationCall sequencingOutput verification and validationA major challenge is providing input values which are very difficult because GUI is not available.23) What are the difference between API Testing and Unit Testing?Difference between API testing and Unit testing are:Sr. No.API TestingUNIT Testing1.API testing is a form of black box testing.Unit testing is a form of white box testing.2.API testing is performed after the project completion during the test.Unit testing is performed when the project is created.3.In API testing there is a wide scope of testing.In Unit testing there is a limited scope of testing we can test only the basic functionality.4.API testing is done by the testers. The whole purpose of API testing is end to end testing of the functionality.Unit testing is done by the developer. In unit testing every functionality is separately tested.24) What is a RESTFUL web services?There are two kinds of web servicesSOAP Web ServicesRESTFUL Web Services1. SOAP (Simple Object Access Protocol) - SOAP is a XML based method which is used in Web Services.2. RESTFUL Web Services - To implement the concept of REST architecture HTTP method is used. RESTFUL Web Services defines URI (Uniform Resource Identifier), and also provides resource representation like JSON and a set of HTTP method.25) What is Resource in REST?REST architecture treats any content as resource, which can be text files, HTML pages, images, videos or dynamic business information. REST server gives the functionality to access the resources and modifies them. We can identify the each resources by URIs/ global IDs.26) What is the way to represent the resource in REST?REST uses different representation to define the resources like text, JSON and XML. The most popular representation of resources is JSON and XML.27) What protocol is used by the RESTFUL Web Services?RESTFUL Web Services uses the HTTP protocol. They use the HTTP protocol as a medium of communication between the client and the server.28) What are the characteristics of REST?Here, are the two characteristics of REST.REST is stateless. With the use of the REST API the server has no status, we can restart the server between two calls, inspite of all the data is transferred to the server.Web Services uses POST method to perform operations, while REST uses GET method to access the resources.29) What is messaging in RESTFUL Web Services?RESTFUL Web Services use the HTTP protocol as a communication tool between the client and the server. This is the technique when the client sends a message in the form of HTTP request the server send back the HTTP reply which is called Messaging. This message consists message data and Meta data i.e. information on the message itself.30) What are the components of an HTTP request?An HTTP request have five components. These are:Action showing HTTP method like GET, PUT, POST, DELETE.Uniform Resource Identifier (URI): URI is the identifier for the resource on the server.HTTP version: Indicate the HTTP version like- HTTP V1.1.Request Header: Request Header carries metadata for the HTTP request message. Metadata could be a client type, format supported by the client, format of a message body, cache setting etc.Request Body: Resource body indicates message content or resource representation.31) What is the HTTP protocol supported by REST?GET: GET is used to request data from the specified resource.GET request can be cached and bookmark. It remains in the browser history and has length restriction. When dealing with sensitive data GET requests should not be used.POST: POST is used to send data to server for creation or updating the resources.POST requests are never cached or bookmark.PUT: PUT replaces the current representation of the target resource with the request payload.DELETE: DELETE removes the specified resource.OPTIONS: OPTION is used to describe the communication option for the target resources.HEAD: HEAD asks for response which is identical to GET requests, but without the response body.32) Can we use GET request instead of PUT to create a resource?PUT or POST method is used create a resource. GET is only used to request the resources.33) What is URI? What is the purpose of web-based service and what is it's format?URI stands for Uniform Resource Identifier. It is a string of characters designed for unambiguous identification of resources and extensibility by the URI scheme. The purpose of URI is to locate the resource on the server hosting of the web service.A URIs format is :////34) What are SOAP Web Services?SOAP (Simple Object Access Protocol) is defined as the XML based protocol. SOAP is also known for developing and designing web services and also enable the communication between the applications developed on different platform by using different programming languages on the internet. SOAP is platform and language independent.35) When we can use SOAP API?We can use SOAP API to perform the operation on records like create, retrieve, update or delete. We can use API to manage password, perform searches etc.
More detailsPublished - Tue, 06 Dec 2022
Created by - Admin s
Design patterns are generally sets of standardized practices used in the software development industry. Design Patterns represent the solutions given by the community to general problems faced in every-day tasks regarding software development.Let's have a look at the most frequently asked design pattern interview questions and answers. These questions will help you with your coding interviews as well as competitive exams.1) Categories Java Design patterns?Based on problem analysis, we can categorize design patterns into the following categories.Creational patternsPlay VideoxFactory method/TemplateAbstract FactoryBuilderPrototypeSingletonStructural patternsAdapterBridgeFilterCompositeDecoratorFacadeFlyweightProxyBehavioral patternsInterpreterTemplate method/ patternChain of responsibilityCommand patternIterator patternStrategy patternVisitor patternJ2EE patternsMVC PatternData Access Object patternFront controller patternIntercepting filter patternTransfer object pattern2) Explain the advantages of Java design pattern?The Design Patterns are reusable in multiple projects.The Design Patterns provide a solution that helps to define the system architecture.The Design Patterns capture software engineering experiences.The Design Patterns provide transparency to the design of an application.They are testified and well-proved since they have been built upon the knowledge and experience of expert software developers.3) What Is Gang of Four (GOF)?In 1994, four authors Erich Gamma, Ralph Johnson, Richard Hel, and John Vlissides published a book titled Design Patterns Elements of Reusable Object-Oriented Software. This book introduced the concept of Design Pattern in Software development.These four authors are known as Gang of Four GOF.4) What are the Creational Patterns?Creational design patterns are related to the way of creating objects. Creational design patterns are used when a decision is made at the time of instantiation of a class.EmpRecord e1=new EmpRecord(); Since new keyword is used to create an object in Java, So, here we are creating the instance using the new keyword. In some cases, the nature of the object must be changed according to the nature of the program. In such cases, we should use the creational design patterns to provide a more general and flexible approach.5) What Is Factory Pattern?It is the most used design pattern in Java.These design patterns belong to the Creational Pattern as this pattern provides one of the best ways to create an object.In the Factory pattern, we don't expose the creation logic to the client and refer the created object using a standard interface.Factory Pattern allows the sub-classes to choose the type of objects to create.The Factory Pattern is also known as Virtual Constructor.6) What Is Abstract Factory Pattern?Abstract Factory Pattern states that define an abstract class or interface for creating families of related objects but without specifying their concrete sub-classes. That means Abstract Factory allowed a class to return a factory of classes. That is why the Abstract Factory Pattern is one level higher than the Factory Pattern.Abstract Factory patterns work around superclasses, which creates other classes.The Abstract Factory Pattern comes under Creational Pattern as this pattern provides one of the best ways to create an object.In the Abstract Factory pattern, an interface is liable for creating a factory of related objects without explicitly identifying their classes.Each generated factory can give the objects according to the Factory pattern.7) Explain Structural Patterns in Java?Structural patterns are used to provide solutions and efficient standards regarding class compositions and object structures. They depend on the concept of inheritance and interfaces to allow multiple objects or classes to work together and form a single working whole.Structural design patterns are responsible for how classes and objects can be composed to form larger structures.8) Explain the Singleton pattern?Singleton pattern in Java is a pattern which allows a single instance within an application. One good example of the singleton pattern is java.lang.Runtime.Singleton Pattern states that define a class that has only one instance and provides a global point of access to it.In other words, it is the responsibility of the class that only a single instance should be created, and all other classes can use a single object.9) Describe in how many ways can you create a singleton pattern?There are two ways of creating a Singleton pattern.1. Early InstantiationIt is responsible for the creation of instance at load time.2. Lazy InstantiationIt is responsible for the creation of instance when required.10) What are the Adapter patterns?Adapter pattern converts the interface of a class into another interface based on the requirement.In other words, it let you convert the interface according to requirement while using the class service with a different interface.It is also known as Wrapper.11) Illustrate the uses of Adapter Patterns?It is used in the following cases:When an object requires to utilize an existing class with an incompatible interface.In case we want to create a reusable class that collaborates with classes which don't have compatible interfaces.12) Discuss the strategy to describe a design pattern?The following points should need to be taken care to describe the design pattern.The Pattern name and classification.The Problem and solution.Consequences: Variation and language-dependent alternatives should also be addressed.Uses: Identify the uses in the real systems and its efficiency.13) What is the decorator pattern in Java explain it with an example?The decorator pattern is one of the popular Java design patterns. It is common because of its heavy usage in java.io (package). The Decorator Pattern uses composition in place of inheritance to extend the functionality of an object at runtime.BufferedReader and BufferedWriter are some excellent examples of decorator pattern in Java.14) Difference between Strategy and State design Pattern in Java?This question is a commonly asked Java design pattern interview question as both Strategy and State pattern has the same structure. The UML class diagram of both patterns looks precisely the same, but their intent is different.The state design pattern is used to manage and define the state of an object, while the Strategy pattern is used to describe a set of an interchangeable algorithm.15) What are the advantages of Composite design Pattern in Java?Composite design pattern allows clients to operate collectively on objects that may or may not represent a hierarchy of objects.Advantage of composite design patterns is as follows.It describes the class hierarchy that contains primitive and complex objects.It makes it easy to add new kinds of the component.It facilitates with the flexibility of structure with a manageable class or interface.16) Can you describe the uses of the composite pattern?It is used in the following cases:When we want to represent a partial or full hierarchy of objects.In case we need to add the responsibilities dynamically to the individual object without affecting other objects.17) What are Some Design Patterns which are used in the JDK library?Some of the design patterns which are used in the JDK library are as follows.The decorator pattern is used by Wrapper classes.Singleton pattern is used by Calendar classes (Runtime).The Wrapper classes use factory pattern like Integer.valueOf.Event handling frameworks use observer pattern like swing, awt.18) Mention advantage of Builder design pattern in Java?Advantages of builder design patterns are as follows.It facilitates with a clear separation between the construction and representation of an object.It provides improved control over the construction process.The constructor parameter is reduced and is provided in highly readable method calls.In design Pattern, the object is always instantiated in a complete state.In the Builder design pattern, Immutable objects can be quickly built in the object building process.19) Can you write Thread-safe Singleton in Java?There are many ways to write a Thread-safe singleton in Java.Thread-safe Singleton can be written by writing singleton using double-checked locking.Another way is, by using static Singleton instance initialized during class loading.By using Java enum to create a thread-safe singleton, this is the most straightforward way.20) Is it possible to create a clone of a singleton object?Yes, it is possible to create a clone of a singleton object.21) What is the proxy pattern, and what does it do?The term Proxy stands for an object representing another object. The proxy pattern provides a substitute or placeholder for another purpose to control access to it.According to Gangs of four, a Proxy Pattern "provides control for accessing the original object."We can perform many security operations like hiding the information of the original object, on-demand loading, etc.It is also called as placeholder or surrogates.22) Explain some different type of proxies?There are many cases where the proxy pattern is beneficial. Let's have a look at some different proxies.Protection proxyIt controls access to the real subject based on some condition.Virtual proxiesVirtual proxies are used to instantiate the expensive object. The proxy manages the lifetime of the real subject in the implementation.It decides the need for the instance creation and when to reuse it. Virtual proxies optimize performance.Caching proxiesCaching proxies are used to cache expensive calls to the real subject. There are many caching strategies that the proxy can use.Some of them are read-through, write-through, cache-aside, and time-based. The caching proxies are used for enhancing performance.Remote proxiesRemote proxies are used in distributed object communication. The remote proxy causes execution on the remote object by invoking a local object method.Smart proxiesSmart proxies are used to implement log calls and reference counting to the object.23) Explain the Chain of Responsibility Pattern?In the chain of responsibility pattern, Sender sends a request to a chain of objects, and any object in the chain can handle the request.A Chain of Responsibility Pattern avoids coupling the sender of a request to its receiver. For example, an ATM service uses the Chain of Responsibility design pattern in monetary transactions.Moreover, we can explain that usually, each receiver contains the reference of another receiver. If one object can fail to handle the request, then it sends the same to the next receiver and so on.24) Explain the advantage of Chain of Responsibilities Pattern and when it is used?It minimizes the coupling.It provides flexibility while assigning the responsibilities to objects.It permits a set of classes to act as one. The events produced in one class can be sent to other handler classes with the help of composition.Usage of Chain of Responsibility PatternIt is used in the following cases:When more than one objects are ready to handle a request, and the handler is unknown.In case the collection or a group of objects that can handle the request must be specified dynamically.25) How is Bridge pattern is different from the Adapter pattern?The motive of the Adapter pattern is to make interfaces of one or more classes to look similar.The Bridge pattern is designed to isolate a class's interface from its implementation so we can vary or substitute the implementation without changing the client code.26) What's the difference between the Dependency Injection and Service Locator patterns?The service locator is used to create class dependencies. The Class is still responsible for creating its dependencies no matter whether if it is using service locator or not.Service locators are also used to hide dependencies. We can't say by looking at an object whether it connects with a database or not when it obtains connections from a locator.With Dependency injection, the class which contains its dependencies neither knows nor cares where they came from.One significant difference is that Dependency injection is much easier to unit test because we can pass in it mock implementations of its dependent objects. We could combine the two objects and apply the service locator.27) What are the MVC patterns?This pattern is one of the most-used patterns from J2EE Design pattern category. It is quite similar to the concept of Model-View-Controller. The abbreviation MVC is taken from the Model-view-controller concept.Models are objects, used as blueprints for all of the objects that will be used in the application.Views contain the presentational aspect of the data and information located in the models.Controllers control both model and view as they serve as a connection between the two objects. The controller plays the role of an interface between View and Model and also intercepts all the incoming requests.28) Explain the Intercepting Filter Design Pattern and also mention its benefits?The intercepting filter design pattern is used to intercept and manipulate a request and response before and after the request processing. Filters perform the authentication/ authorization/ logging or tracking of request and then forward the requests to corresponding handlers. Let's have a look at some basic entities of Intercepting design pattern.FilterIt performs a certain task before or after the execution of request by request handler.Filter ChainIt contains multiple filters and helps to execute them in defined order on target.TargetThe target object is the request handlerFilter ManagerIt manages the filters and Filter Chain.ClientThe client object is one who sends a request to the Target object.Benefits of Intercepting Filter Design PatternFilter pattern provides central control with loosely coupled handlers.It expands reusability.The new filter can be added at any time without affecting the client's code.Filters can be selected dynamically during program execution.29) Explain Data Access Object (DAO) pattern?Data Access Object Pattern is used to isolate low-level data accessing API or actions from high-level business services. Following are the components in the DAO Pattern.Data Access Object InterfaceDAO interface describes the standard actions to be performed on a model object(s).Data Access Object concrete classThis class implements a DAO interface. This class is accountable to get data from a data source which can be Xml/database or any other storage mechanism.Model Object or Value ObjectThis object is a plain old java object containing get/set methods to store data retrieved using DAO class.30) Mention what is the difference between VO and JDO?The difference between VO and JDO is that the JDO is a persistent technology that competes against entity beans. It allows to create POJO (plain old java objects) and persevere them to the database.While VO (value objects) represents an abstract design pattern, that is used in conjunction with entity beans, JDBC and JDO.
More detailsPublished - Tue, 06 Dec 2022
Fri, 16 Jun 2023
Fri, 16 Jun 2023
Fri, 16 Jun 2023
Write a public review