Verizon
10+ FCC Clutch Interview Questions and Answers
Q1. Write a program to find a missing number in Arrays?
Program to find a missing number in Arrays
Sort the array and iterate to find the missing number
Use XOR operation to find the missing number
Calculate the sum of all numbers and subtract from the sum of expected numbers to find the missing number
Q2. What is the Collection Framework?
The Collection Framework is a unified architecture for representing and manipulating collections in Java.
It provides interfaces like List, Set, Queue, etc. for storing and manipulating collections of objects.
It also provides concrete classes like ArrayList, HashSet, PriorityQueue, etc. that implement these interfaces.
It supports algorithms like sorting, searching, and shuffling on collections.
It is a part of the Java Collections Framework.
Example: List
names = new ArrayList<>...read more
Q3. What is abstract class in Java?
An abstract class is a class that cannot be instantiated and is used as a base class for other classes.
An abstract class can have abstract and non-abstract methods.
Abstract methods have no implementation and must be implemented by the subclass.
A class can only extend one abstract class but can implement multiple interfaces.
Abstract classes are used to provide a common interface for a group of related classes.
Example: abstract class Animal { abstract void makeSound(); }
Q4. Constructor is declared static or not?
Constructor can be declared static or non-static depending on the use case.
If a constructor is declared static, it means it can be called without creating an instance of the class.
Static constructors are used to initialize static fields of the class.
Non-static constructors are used to initialize instance fields of the class.
If a class has both static and non-static constructors, the non-static constructor is called when an instance of the class is created.
Q5. What are locators present in Selenium?
Locators are used to identify web elements in Selenium.
Locators are used to find and interact with web elements on a web page.
There are several types of locators in Selenium, including ID, name, class name, tag name, link text, and partial link text.
For example, to find an element with the ID 'username', you would use the ID locator: driver.findElement(By.id('username'));
Q6. Write a program to Reverse a String?
Program to reverse a string
Use a loop to iterate through the string and append each character to a new string in reverse order
Alternatively, use built-in string reversal functions in some programming languages
Q7. To find a one element Xpath in Amazon.com
To find a one element Xpath in Amazon.com
Inspect the element in the browser
Right-click on the element and select 'Copy XPath'
Use the copied XPath in your code
Q8. What is explicit Constructor?
An explicit constructor is a constructor that is defined with the 'explicit' keyword.
It is used to prevent implicit conversions from the constructor's parameter type to the class type.
It requires the constructor to be called explicitly with the class name and constructor arguments.
It is commonly used to avoid unexpected type conversions and improve code clarity.
Q9. What is interface in Java?
An interface in Java is a collection of abstract methods and constants that can be implemented by a class.
An interface is declared using the interface keyword.
It can be implemented by any class using the implements keyword.
All methods in an interface are implicitly public and abstract.
Interfaces can also contain constants, which are implicitly public, static, and final.
Interfaces are used to achieve abstraction and provide a way for unrelated classes to communicate with each ...read more
Q10. What is reletive Xpath?
Relative XPath is a way to locate elements in XML or HTML documents based on their position relative to other elements.
Relative XPath uses the relationships between elements to navigate the document structure.
It is more flexible than absolute XPath as it adapts to changes in the document's structure.
Relative XPath expressions start with a reference to an element and then use various axes and predicates to locate the desired element.
Example: //div[@class='container']/a[2] sele...read more
Q11. Chrome capabilities of selenium automation
Selenium automation can control Chrome browser capabilities such as handling pop-ups, cookies, and browser settings.
Selenium can handle pop-ups and alerts using the switchTo() method
Cookies can be managed using the addCookie() and deleteCookie() methods
Browser settings can be modified using the ChromeOptions class
Examples: disabling images, setting the browser window size, and using headless mode
Reviews
Interviews
Salaries
Users/Month