How to reverse an array in java
What is LinkedList and an example in Java?
What is LinkedList and an example in Java?
LinkedList is a linear collections of data elements.
// Declaring LinkedList
LinkedList<String> abclinked = new LinkedList<String>();
abclinked.add(“a”);
abclinked.add(“b”);
abclinked.add(“c”);
system.out.println(“the linked list is ” + abclinked )
Linked Lists are Dynamic size and this feature certainly has an endge over Array. insertion and deletion also possible for Linked Lists which may not be done on Array which is already defined.
The downside of Linked Lists is that the extra memory space for a pointer is required with each element of the list. Also accessing elements are sequential manner starting from the first node is difficult.
How to reverse an array in java – Please click here
What is Thanksgiving?
What is Thanksgiving?
Thanksgiving is a national holiday of USA, Canada etc. In USA, it is celebrated on 4th Thursday of November. This day is to give thanks for the blessing of the harvest. Modern Thanksgiving has been changed a lot. Everyone are curious about the Thanksgiving deals 🙂 and it has been well celebrated as a holiday. Most of the organization gives holidays on 4th Thursday & Friday of November making it a long weekend. One can look for Thanksgiving recipes, deals, restaurants to make the holidays more enjoyable.
What is DevOps?
What is DevOps?
DevOps is the latest Development Methodology where Dev team and Operations team are collaborated for better productivity , Improving the time to market of the product releases etc.
DevOps uses lots of tool like Git for Version controlling , Jenkins for Integrating multiple DevOps tools, helps on better communications between Developers, Testers, Operations team etc. Selenium is another tool used as part of DevOps which is a test automation and Jenkins controls and manages Selenium execution.
Puppet is another DevOps tool used for configuration management. Configuration script will be stored in puppet server and puppet agents on various VMs or target machines will be communicating puppet master. There are build management tools like Maven will be part of DevOps. Nagios is another DevOps tool which monitors systems, servers, infrastructures to make sure the deployed applications are running on production servers without any issues.
For testing specific requirements, Jenkins will help to send notification to Tester when a build is available for testing. Jenkins will trigger the selenium scripts and after execution, the results will be send out to target users including developers, management teams etc.
How to Install TestNG in Eclipse IDE for Selenium WebDriver automation testing
How to Install TestNG in Eclipse IDE for Selenium WebDriver automation testing
- In Eclipse, navigate to Help >> navigate to sub menu “Install New Software”, click on it.
- Add name as “TestNG”
- Add Location as “http://beust.com/eclipse/”, click ok
- select “TestNG” , click next (when TestNG ready to install)
- follow the steps and complete installation.
How to use JMeter for login authentication?
How to use JMeter for login authentication?
Regular Expression Extractor is used to handle this situation. Following steps may be used,
- First find out the GET request where the authentication required & POST request that posts the credential to login
- The response from the GET request should have tokens which needs to be be extracted and sent as a parameter in the POST request.
- Add a Regular Expression Extractor to store these tokens and include the tokens as parameter in the POST request
What is polymorphism in java with example
What is polymorphism in java with example
polymorphism means one object can take multiple forms. lets explain this using a method poly() in java class.
steps:
- create a package polymorphismPkg in eclipse
- create a class polymorphismClass in eclipse
- now write below code in the class polymorphismClass
package polymorphismPkg;
public class polymorphismClass {
public static void main(String[] args) {
polymorphismClass obj1 = new polymorphismClass();
obj1.poly(1, 2);
obj1.poly(1, 2, 3);
obj1.poly(1, 22.11);
}
public static void poly(int a, int b)
{
System.out.println(“this is first method for polymorphism”);
}
public static void poly(int n, int b, int c)
{
System.out.println(“this is like first method but number of argument is different in signature “);
}
public static void poly(int n, double b)
{
System.out.println(“this is like first method but argument order is different in the signature “);
}
}
What is Inheritance in Java with example
What is Inheritance in Java with example
One class in Java can get the methods and properties from other class – this helps reducing the coding efforts , increase code reusability and maintainability.
e.g.
public class classB extends classB {
}
in the above Java code, classB class gets the methods and properties from classA class.
steps,
- create a meaningful project and a package in eclipse
- create 2 classes classA and classB under the package (Codes are below)
Code for classA class as below:
package inheritancePkg;
public class classA {
public void A()
{
System.out.println(“this is from father class”);
}
}
Code for classB class as below:
package inheritancePkg;
public class classB extends classA // extends classA is inheritance from classA class to classB
// so we are able to write obj1.add() from father.
{
public static void main(String[] args)
{
classB obj1 = new classB();
obj1.A();
obj1.B();
}
public void B()
{
System.out.println(“this is from son class “);
}
}
Top 5 sql interview questions and answers
Top 5 sql interview questions and answers
What is DDL, DML, DCL, TCL in SQL ?
DDL refers to Data Definition language. DDL is used to create/modify the structure of Database. e.g. CREATE, ALTER, DROP statement..
DML refers to Data Manipulation language. DML is used to retrieve, modify, delete, insert and update data in database. e.g. SELECT, UPDATE, INSERT statement
DCL refers to Data Control Language. DCL is used to create roles, permissions, and control access to database. e.g. GRANT, REVOKE statement.
TCL refers to Transactional Control Language. TCL is used to manage different transactions occurring within a database. e.g COMMIT, ROLLBACK statement
What is the difference between UNION vs UNION ALL?
UNION and UNION ALL are used for merging two tables which has similar structure.
the difference between UNION and UNION ALL is that the UNION removes the duplicates while merging tables but UNION ALL do not and retain all duplicates.
UNION is slower in performance as it has additional task of removing duplicates which causes more time in execution.
What is the difference between query and subquery?
A Query is a code written to fetch information from the database where as subquery is a query within another query. Basically subquery is an inner query. SubQuery is designed to executed first. The result of subquery is passed on to the main query which then process using the subquery output.
What is a stored procedure?
Stored Procedure is a function having several SQL statements. Stored procedure can be executed to process all SQL statements in it.
What is the difference between WHERE clause and HAVING clause?
Both WHERE and HAVING are used for filtering out records based conditions. WHERE clause can only be applied for static non-aggregated column whereas HAVING for aggregated columns.
SELECT * FROM Cricketbat WHERE batlenght > 2 feet
SELECT COUNT(Cricketbat)
FROM Bat
GROUP BY Team
HAVING COUNT(Cricketbat) > 2 feet;
What is DELETE and TRUNCATE commands?
DELETE command is used to remove selected rows from a table. A WHERE clause can be used to specify the rows to be deleted
Top 5 Salesforce Interview questions
Top 5 Salesforce Interview questions
1. What is object in salesforce?
Objects are database tables used to store specific data. There are two types of objects. 1. Standard objects 2. Custom objects.
2. What are different types of relationship in salesforce?
There are two different types of relationship in salesforce.
1. Master detail relationship
2. Lookup relationship
3. What is a trigger in salesforce ?
A Trigger is a code that is executed before or after a record is inserted or updated.
4. How many reports can be added to salesforce dashboard ?
20
5. What is validation rule ?
While creating or modifying a record, based on certain conditions validation rule helps to display error message.
6. What are escalation rules in sales force?
Escalation rules can be created on sales force case object and based on priority escalation emails can be sent.