Amdocs Java Interview Questions and Answers for experienced Developer | Code Decode

Code Decode
Code Decode
8.8 هزار بار بازدید - 2 سال پیش - In this video of code
In this video of code decode we have explained Amdocs Java Interview Questions and Answers for experienced developer

Udemy Course of Code Decode on Microservice k8s AWS CICD link:
https://openinapp.co/udemycourse

Course Description Video :
https://yt.openinapp.co/dmjvd

The first questions which was asked in amdocs java interview was
Explain the Life Cycle of a Thread in Java .
A thread in Java at any point of time exists in any one of the following states. A thread lies only in one of the shown states at any instant:

NEW – a newly created thread that has not yet started the execution.
Thread t = new Thread(runnable);

RUNNABLE – either running or ready for execution but it's waiting for resource allocation
t.start();

BLOCKED – waiting to acquire a monitor lock to enter or re-enter a synchronized block/method

WAITING – waiting for some other thread to perform a particular action without any time limit
object.wait()
thread.join() or


TIMED_WAITING – waiting for some other thread to perform a specific action for a specified period
thread.sleep(long millis)
wait(int timeout) or wait(int timeout, int nanos)
thread.join(long millis)


TERMINATED – has completed its execution

Another Questions asked in Amdocs Java Interview Questions and Answer
Difference between the DELETE and TRUNCATE command in DBMS.
Delete
Truncate
It is a DML(Data Manipulation Language) command.
While it is a DDL(Data Definition Language) command.
The DELETE command is used to delete specified rows(one or more).
While this command is used to delete all the rows from a table.
There may be a WHERE clause in the DELETE command in order to filter the records.
While there may not be WHERE clause in the TRUNCATE command.
DELETE command is slower than TRUNCATE command as it performs deletion row-by-row one at a time from the table,
While the TRUNCATE command is faster than the DELETE command because it operates on data pages instead of rows because it deletes entire table data atonce.


What are DI, IOC, and @Qualifers?
IOC - Inversion of control is a design principle which helps to invert the control of object creation.

DI - Dependency Injection is a design pattern which implements IOC principle. DI provides objects that an object needs. Let’s say, class Employee is dependent on Address. So rather than creating object of Address with new keyword within the class Employee, we can inject the dependencies via a constructor or setter injection.

@Qualifier - There may be a situation when you create more than one bean of the same type and want to wire only one of them with a property. In such cases, you can use the @Qualifier annotation along with @Autowired to remove the confusion by specifying which exact bean will be wired.


How arraylist grows in java
The ArrayList is a resizable-array implementation of the List interface.

When an ArrayList is created, its default capacity or size is 10 if not provided by the user. The size of the ArrayList grows based on load factor and current capacity.

The Load Factor is a measure to decide when to increase its capacity. The default value of load factor of an ArrayList is 0.75f

ArrayList in Java expands its capacity after each threshold which is calculated as the product of current capacity and load factor of the ArrayList instance.

Threshold = (Load Factor) * (Current Capacity)
For example, if the user creates an ArrayList of size 10,
Threshold = Load Factor * Current Capacity = 0.75 * 10 ≅ 7
This means after adding the 7th element to the list, the size will increase as it has reached the threshold value.



Summary :
The backing data structure of ArrayList is an array.
When the array becomes full and we want to add new elements, a new ArrayList with a new capacity is created.
The elements present in the old ArrayList are copied in the new ArrayList, while deleting the old ArrayList.


Most Asked Core Java Interview Questions and Answers:
Core Java frequently asked Interview ...
Advance Java Interview Questions and Answers: Advance Java Interview Questions

Java 8 Interview Questions and Answers: Java 8 Interview Questions(New Features)

Hibernate Interview Questions and Answers:
Hibernate Interview Questions Java

Spring Boot Interview Questions and Answers:
Advance Java Interview Questions

Angular Playlist:  Angular Course Introduction || Angular 8
SQL Playlist: SQL Interview Questions and Answers

GIT: GIT


Subscriber Code Decode: https://www.seevid.ir/c/CodeDecode?...
LinkedIn : LinkedIn: codedecodeyoutube
Instagram: Instagram: codedecode25

#AmdocsInterview #interviewquestions #codedecode
2 سال پیش در تاریخ 1401/09/03 منتشر شده است.
8,883 بـار بازدید شده
... بیشتر