Coder Baba
2.41K subscribers
1.01K photos
23 videos
722 files
726 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
-: Top 50 Java interview questions :-

#1) What is JAVA?
#2) What are the features of JAVA?
#3) How does Java enable high performance?
#4) Name the Java IDE’s?
#5) What do you mean by Constructor?
#6) What is meant by the Local variable and the Instance variable?
#7) What is a Class?
#8) What is an Object?
#9)What are the OOPs concepts?
#10) What is Inheritance?
#11) What is Encapsulation?
12) What is Polymorphism?
#13) What is meant by Method Overriding?
#14) What is meant by Overloading?
#15) What is meant by Interface?
#16) What is meant by Abstract class?
#17) Difference between Array and Array List.
#18) Difference between String, String Builder, and String Buffer.
#19) Explain about Public and Private access specifiers.
#20) Difference between Default and Protected access specifiers.
#21) Difference between HashMap and HashTable.
#22) Difference between HashSet and TreeSet.
#23) Difference between Abstract class and Interface.
#24) What is the meaning of Collections in Java?
#25) What are all the Classes and Interfaces that are available in the collections?
26) What is meant by Ordered and Sorted in collections?
27) Explain the different lists available in the collection.
28) Explain about Set and their types in a collection.
29) Explain about Map and its types.
30) Explain the Priority Queue.
31) What is meant by Exception?
32) What are the types of Exceptions?
33) What are the different ways to handle exceptions?
34) What are the advantages of Exception handling?
35) What are the Exception handling keywords in Java?
36) Explain about Exception Propagation.
#37) What is the final keyword in Java?
38) What is a Thread?
39) How do you make a thread in Java?
40) Explain about join () method.
41) What does the yield method of the Thread class do?
42) Explain about wait () method.
#43) Difference between notify() method and notifyAll() method in Java.
#44) How to stop a thread in java? Explain about sleep () method in a thread?
#45) When to use the Runnable interface Vs Thread class in Java?
46) Difference between start() and run() method of thread class.
47) What is Multi-threading?
48) Explain the thread life cycle in Java.
49) What is Synchronization?
50) What is the disadvantage of Synchronization?
πŸ‘† Data Structures notes πŸ‘†
This media is not supported in your browser
VIEW IN TELEGRAM
Advanced Login System
Create Stored Procedures in MS SQL Server 2012
1- create a stored procedure with name "spAuthentication"
Go to, DBLoginSystem ->> Programmability ->> Stored Procedures
Right Click and Create new Stored Procedure

2-You will see pre-defined template as shown below.Just delete everthing in pre-defined template, copy the follwing script and paste it.

3-SQL Script: Store Procedure Authentication
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

USE [DBLoginSystem]
GO

/****** Object: StoredProcedure [dbo].[spAuthentication] Script Date: 01-12-2018 8.58.15 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spAuthentication] (@Email varchar(50),
@Password varchar(50),
@Result varchar(100) OUTPUT,
@Role varchar(50) OUTPUT,
@userName varchar(50) OUTPUT)
AS
BEGIN
DECLARE @isActivated bit,
@isReAttempLoked bit,
@Count int,
@RetryCount int,
@RoleId int,
@UserInfo varchar(50);
SET NOCOUNT ON;

IF EXISTS (SELECT
*
FROM Users
WHERE Email = @Email)
BEGIN
--select @Result = 'Valid Credential';
SELECT
@isActivated = isActivated,
@RoleID = RoleID,
@UserInfo = UserName
FROM Users
WHERE Email = @Email
IF (@isActivated = 0)
BEGIN
SELECT
@Result = 'Your Account is locked by Admin.',
@Role = '',
@userName = '';
END
ELSE
BEGIN
--select @Result = 'Unlocked';
SELECT
@isReAttempLoked = isLocked
FROM Users
WHERE Email = @Email
IF (@isReAttempLoked = 1)
BEGIN
SELECT
@Result = 'Account has been locked by invalid credential attempt.',
@Role = '',
@userName = '';
END
ELSE
BEGIN
SELECT
@Count = COUNT(Email)
FROM Users
WHERE ([Email] = @Email)
AND [Password] = @Password
IF (@Count = 1)
BEGIN
-- Reset RetryAttempts
UPDATE Users
SET RetryAttempts = 0,
LastLogin = GETDATE()
WHERE Email = @Email
SELECT
@Result = 'Logged Successfully!',
@Role = (SELECT
RoleName
FROM Roles
WHERE RoleID = @RoleID),
@userName = @UserInfo;
END
ELSE
BEGIN
-- If a match is not found
SELECT
@RetryCount = ISNULL(RetryAttempts, 0)
FROM Users
WHERE Email = @Email

SET @RetryCount = @RetryCount + 1

IF (@RetryCount <= 3)
BEGIN
-- If re-try attempts are not completed
UPDATE Users
SET RetryAttempts = @RetryCount
WHERE Email = @Email

SELECT
@Result = 'Invalid Password, No of attemps ' + CONVERT(varchar(50), @RetryCount) + ' out of 3.',
@Role = '',
@userName = '';
END
ELSE
BEGIN
-- If re-try attempts are completed
UPDATE Users
SET RetryAttempts = @RetryCount,
IsLocked = 1,
LockedDateTime = GETDATE()
WHERE Email = @Email

SELECT
@Result = 'Your account is locked.',
@Role = '',
@userName = '';
END
END
END
END
END
ELSE
BEGIN
SELECT
@Result = 'Invalid email Id.',
@Role = '',
@userName = '';
END
END
GO

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”-Subscribe @coderbaba
4- run script
5-Check Email against database if false returns "Invalid Email Id".
6-If user account is blocked then it returns "Your account has been blocked by Admin. Please contact Administrator".
7-If user account is locked due to invalid credential attempts then it returns "Account has been locked by invalid credential attempts."

8-If Email Id and Password not matched against Database then
Retry count increase by 1
9-If Retry Count > 3 then (Invalid credential Attempts)
User Account will be locked automatically and returns "Your account has been locked by invalid credential attempts".

10-If Email Id and Password matched against Database then

Retry count = 0 (Clears previous invalid attempts)
returns "Logged Successfully"

If Role is Admin then Populate Admin Form
11-else If Role is Employee then Populate Employee Form.
TECH MAHINDRA Interview - 2022

Online TR :
Explain the Project !
Tell me about your family !
Why I have to pay for you?
Why IT ? (As I am from ECE)
Asked like " I have only one job offer , can you sacrifice it to your friend rather than to you?"

Online HR :
Tell me about yourself and about project apart from the technical part
What do you know about Tech Mahindra?
Are you willing to accept the 2 years service agreement?
Can you work for more hours?
Ready to relocate?
At present any Offers?
follow @coder_baba
EPAM Interview Experience - 2022

1. Tell me about yourself.
2. Can you tell us about the last project you worked on?
3. Tell us about a time something went wrong in a project you were managing.
4. How do you prioritize tasks in a project?
5. What was your most successful project?
6. What’s your experience with budget management?
7. How would you describe a project plan?
8. How would you create an environment of
9. What tools do you use to plan a project?
10. Describe your experience in this industry.
11. One of your team members is asking for more time
12. How would you deal with a difficult stakeholder?
follow @coder_baba