Netwin Systems & Software
ComFuture Solutions Interview Questions and Answers
Q1. How can we create object of class of private constructor?
You can create an object of a class with a private constructor by using a static method within the class.
Create a static method within the class that returns an instance of the class.
Call the static method to create an object of the class.
Q2. SQL query to fetch first 10 rows from the table
SQL query to fetch first 10 rows from the table
Use SELECT statement
Add LIMIT clause with 10 as argument
Optionally, use ORDER BY clause for specific order
Q3. Can we make constructor private ?
Yes, we can make a constructor private in Java.
Private constructors are used to prevent instantiation of a class from outside the class itself.
Private constructors are commonly used in singleton design pattern.
Private constructors can be used in utility classes where all methods are static and no instance creation is needed.
Q4. Non aggregate functions in sql
Non-aggregate functions in SQL are used to manipulate individual data values.
Non-aggregate functions operate on individual data values, rather than groups of values.
Examples include string functions (e.g. CONCAT, SUBSTRING), date functions (e.g. DATEADD, DATEDIFF), and mathematical functions (e.g. ABS, ROUND).
These functions can be used in SELECT, WHERE, and ORDER BY clauses to manipulate data.
Non-aggregate functions can also be used in conjunction with aggregate functions to...read more
Q5. How can you secure api
Securing an API involves using authentication, authorization, encryption, and input validation.
Use authentication methods like OAuth, JWT, or API keys to verify the identity of clients accessing the API.
Implement authorization to control what actions different users can perform within the API.
Encrypt data transmission using HTTPS to protect sensitive information from being intercepted.
Validate and sanitize input data to prevent common security vulnerabilities like SQL injecti...read more
Q6. What is Have clause?
HAVING clause is used in SQL to filter the results of a GROUP BY clause.
Used with GROUP BY to filter grouped results
Filters rows after grouping
Similar to WHERE clause but operates on grouped data
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month