1.How you will swap in integer array of 2 variable ?
Program
2.How you will search in json structure ,which is a tree structure ? Don't Know
3.can we test develop in different databases a project ? YES
YES we can ,in spring boot we can have this feature,we can put in application.properties file
there to define profile for database you want . ?
4.When you login at facebook,which api calls put or get ? Don't Know
5.Types of some authentication mechanisms ? Don't Know
6.Types of MIME in postman ? DONE
7. Functional interface ? DONE
==========================================
8.Lamda expression ?
Lambda is anonymous (no name) function having no name , no return type,no modifier
Lambda Expressions were added in Java 8. A lambda expression is a short block of
code
Lambda expression in java implements the functional interface and it can be treated as
any other java object.
The Lambda expression is used to provide the implementation of an interface which
has functional interface. It saves a lot of code. In case of lambda expression, we don't
need to define the method again for providing the implementation.
Why use Lambda Expression
1.) To provide the implementation of Functional interface.
2.) Less coding.
Java Lambda Expression Syntax
(argument-list) -> {body}
Java lambda expression is consisted of three components.
1) Argument-list: It can be empty or non-empty as well.
2) Arrow-token: It is used to link arguments-list and body of expression.
3) Body: It contains expressions and statements for lambda expression.
===============================
9.Difference between JRE and JVM ?
JRE is an acronym for Java Runtime Environment.
JRE identifies all the helpful class libraries needed for execution,
It is used to provide the runtime environment. It is the implementation of JVM. It physically
exists. It contains a set of libraries + other files that JVM uses at runtime.
JRE also contains various integration libraries like the JDBC (Java Database Connectivity),
JNDI (Java Naming and Directory Interface), RMI (Remote Method Invocation), and many more.
JVM is a subclass of JRE that decodes the bytecode into machine language and other minor
tasks.
It is called a virtual machine because it doesn't physically exist.
The JVM performs the following main tasks:
Loads code
Verifies code
Executes code
Provides runtime environment
===============================
10.Spring Actuator ?
Spring Boot Actuator is a sub-project of the Spring Boot Framework. It uses HTTP endpoints to
expose operational information about any running application.
The main benefit of using this library is that we get health and monitoring metrics from
production-ready applications.
To use Actuator in your application, you need to enable the spring-boot-actuator dependency in
pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
===============================
11.What is Left outer join ? DONE
12.What are the levels of logging ? DONE TRACE,WARN,INFO,DEBUG,ERROR
13.how you will write the unit cases ?
14.what is container ?
15.What is ACID Properties in Databases ?
16.What are CORS ERROR ?
17.Benefits of POM.XML ?
18.What are the Building Tools ?
19.Maven working and benefits ?
20.What is VM ?
21.How you will convert Double to int ?
22.What is Optional ?
23.What is findBy in Optional ?
24.What is IsNull in Optional ?
25.What are the legacy classes in Java ?
26.How many types of repositoeries in JPA ? CrudRepository , PagingAndSortingRepository,
JpaRepository
27.Difference between get and load ? Done
28.Different stages in Hibernate for Object ? Done Transient , Persistent, Detached,
29.How to run a project in Spring Boot ? Done
30.Main components of SpringBoot Application ? Done
31.What is actuator in Spring Boot ? Done
32.How many types of mapping in Hibernate ? Done
33.Hibernate All the Mapping syntax ? Done
34.What is Class Loader,name of in-built Class Loaders ?
35.Name of fail fast and fail safe Collections ? fail safe CopyArrayList and ConcurrentHashMap
36.What is fail-fast and fail-safe ?
37.What is the difference between spring and springboot ? DONE
38.What is profiler ? DONE
39.How we can change the database from single properties file ? DONE
40.Default port of springboot application ? DONE
41.How we can change the port ? DONE
42.How we can change the server ? DONE
43.What is filter in springboot ?
44.How we can change the database in springboot application ? DONE
45.Can we create a desktop application in springboot,if yes then how ? DONE
46.Communication by which technique in microservices ? DONE Synchronus and
Asynchronous application
47.How to write unit test cases ?
48.What is Kafka?
49.What is CI and CD ?
50.What is Rabit MQ?
51.How we call the application properties values in springboot ?
52.Which vendor auth or security you are using ?
53.Difference between put and post ?
54.What is @Pathvariable in SpringBoot ? DONE
55.What is restcontroller ?
56.What is SOAP ?
57.What is WSDL ?
58.What is concurrent Hashmap ?
59.Internal working of hashset ?
60.What is hashmap ?
61.What is index ?
62.What is optional ?
63.What is functional interfaces ?
64.How we remove duplicates from list ?
65.What is Apache Kafka ?
66.What is the First Command in Docker File ?
67.How to write Docker File ?
68.Types of Caching in Hibernate ?
69.Reverse of LinkedList Program ?
70.What is Dependency Injection and IOC ?
71.Which is the new features in Java 8 for performance ?
72.Difference between ArrayList and Linked List ?
73.Internal Working of LinkedList and ArrayList ?
74.Complexity of LinkedList,ArrayList,Linear and Binary Search ?
75.What is CI CD ?
76.What is volatile ?
77.What is Marker Interfaces ? Done
78.What is Serialization and De-serialization ? Done
79.Advantages and disadvantages of it ? Done
80.What is the difference between Path Variable and Class Path Variable? Done
81.What is constructor and types of Constructors ? Done
82.What is nvl and nvl2 in Oracle ? Done
83.Difference between Union and UnionALL and Intersect along with Minus ? Done
84.Size of BLOB in Oracle Database ? 4 GB Done
85.Difference between Collection and Collections ? Done
86.Difference between Array and ArrayList ? Done
87.Difference between HashSet and LinkedHashSet ? Done
88.Difference between LinkedList and ArrayList ? Done
89.Difference between ArrayList and Vector ? Done
90.Difference between HashMap and HashTable ? Done
91.Difference between Iterator and ListIterator ? Done
92.Difference between Iterator and Enumeration ? Done
93.Difference between List and Set ? Done
94.Difference between Set and Map ? Done
95.Difference between HashSet and TreeSet ? Done
96.Difference between HashSet and HashMap ? Done
97.Difference between HashMap and TreeMap ? Done
98.Difference between Comparable and Comparator ? Done
99.How to synchronize List ,Set and Map elements ? Done
100.Name of fail fast and fail safe Collections ? Done
101.What is fail-fast and fail-safe ? Done
102.Difference between length of Array and Size of ArrayList ? Done
103.How to convert ArrayList to Array and Array to ArrayList ? Done
104.How to make ArrayList ReadOnly ? Done
105.How to remove duplicates from ArrayList ? Done
106.How to reverse ArrayList ? Done
107.How to sort ArrayList in Descending Order ? Done
108.What is Class Loader,name of in-built Class Loaders ?
109.Concurrent Hashmap ?
110.Internal working of hashSet ?
111.What is Rabbit MQ ?
112.What is Apache kafka ? Done
113.What is functioal interface ? Done
114.what are the challenges ,you faced in your carrier ? Done
115.What is optional ? Done
116.Unit Test Cases ? Done
117.What is @requestMapping ? Done
118.What is pathvariable ? Done
119.How you implement security and from which company ? Done
120.what is index ? Done
121.Examples of 1 to many and many to many ? Done
122.What is Azure ? Done
123.What is Abstraction ? Done
124.What is concurrent HashMap ? Done
125.Why we require Concurrent HashMap ,even we have a collections.syn method ? Done
126.What is linked List ,internal data structur e ? Done
127.What is arraylist , internal data structure used ? Done
128.When we should go for arraylist and when linkedlist ? Done
129.How we will remove the duplicates from HashMap using the logic ? Done
130.Difference between resultset and rowset ? Done
131.Difference between spring jpa and spring data ? Done
132.How Autoconfiguration works internally in springboot ? Done
133.Why Streams introduced ? Done
134.What is Devops ? Done
135.Runnable using Lambda Expressions and reverse of it like expressions using Runnable ?
Done
136.String Reverse using Recurrsion ? Done
137.factorial using Recurrsion ? Done
138.
0 1 2 2 1 1 0 0 using BigO(n) Complexity
It is using Buble Sort and the complexity is n2 for your answer
int a[8]={0 1 2 2 1 1 0 0};
int b[8];
int item;
for(int i=0;i<=a.length;i++)
{
item =a[i];
for(int j=i;j<=i;j++)
{
if(item<=a[j])
{
b[i]=item;
break;
}
}
}
139.Find the name and managerName of an employee ? with 3rd Highest salary ?
Employee
id name salary managerId
1 Chetan 100 3
2 Rahul 200 1
3 Subhash 300 null
140. What is Spring JPA ?
141. What is Test Driven Unit Test Cases ?
142.What is CopyOnWriteArrayList ?
143.How will you create your own Exception ?
144.Can we store null in HashTable ?
145.Difference between application context and beanfactory.
146.what is Factory Pattern.
147. What is synchnchrous and asynchronous .
[10:20 pm, 05/03/2022] Subhash: Questions
Http codes
Generics
Hashcode equals contract
Synchronize block and Synchronizedethod difference
Reflection api
@qualifier and @autowired
What is enums and why we use them
Java 1.7 features try with resources what is that
Difference between hashmap and linkedhashmap
What is concurrent modification exception
Difference between Collections and stream api
What is optional class in java
Types of transaction management in spring
Constraint violation error when it came
Aggregate functions in sql
Named query in Hibernate
Criteria query in Hibernate
Difference between put and patch
RBI
Can we use controller as same feature to rest controller
Difference between hashmap and hashtable
Can we put samekey in hashmap ,if yes then how
If we dont override hashcod…
[10:21 pm, 05/03/2022] Subhash: How kubernates wok?
What is Concurrency ?
What is volatile?
How maven build work ,there is a scope what us that?
Version of junit test cases?
[10:22 pm, 05/03/2022] Subhash: Remove Duplicates from Sorted Array Example 1:
Input: nums = [1,1,2] Output nums = [1,2,_]
Input: nums = [0,0,1,1,1,2,2,3,3,4]
Output: nums = [0,1,2,3,4,,,,,_]
Find Common Characters Given a string array words, return an array of all characters that show
up in all strings within the words (including duplicates). You may return the answer in any order.
Input: words = ["bella","label","roller"]
Output: ["e","l","l"]
Input: words = ["cool","lock","cook"]
Output: ["c","o"]
Given an array of integers,
find two numbers such that they add up to a specific target number.
Input: numbers={2, 7, 11, 15}, target=9
Output: index1=0, index2=1
26 index x1=2 index2 =6
[10:24 pm, 05/03/2022] Subhash: Infosys:
How Garbage Collector Works ?
Memory Management in Java ?
Reverse a singally linked list
Find pairs of integers from array of integers where sum = X
AWS CI CD you should no
You should learn Devops ,azure or aws
Can we overload main method ? Yes
Can we override main method ? No
AWS Lambda
Ec2
Eureka
Kafka remove it
How we handle exceptions in springboot
component service and controller difference
Exception Handler in Spring boot.
How microservices work
How to handle internationalization .
Difference between service and component
Internal working of HashMap ?
Difference between HashMap and Set ?
How to take input as Jason and send back response in xml format ?
[10:24 pm, 05/03/2022] Subhash: TSYS
want to ammend the existing commit with some changes
want to review team member code at my local
Internel working of HashMap ,Hash Set ?
Difference between HashSet and ArrayList ?
Exception Hierarchy,Collection Hierarchy ?
Unit test cases ?
There are 2 arrays
1st array 1,2,3,5,4
2nd array 7,9,6
Now Sort the array for a final array
Int a[5]=new a[];
Int b[3]=new b[];
int c[8]=new c[];
for(int i=0 i<a.size;i++)
{
c[i]=a[i];
}
for(int i=0 i<b.size;i++)
{
c[i]=b[i];
}
for(int i=0 i<c.size;i++)
{
item =c[i];
for(int j=0;j<=i;j++)
{
if(c[i]=>item)
{
c[i]=item;
break;
}
}
}
This was wrong answer by me
he asked plz improev the basics and use length instead of array
and calculate the timecomplexity of this
[10:25 pm, 05/03/2022] Subhash: JSON is a language or what ? DONE
Where we use declare ?
What is unit testing in your project? And how to write unit test cases ?
What is script let's in web project ?
What is agile methodologies ? What are the phases of it or components ?
Can we create a class final,if yes then what will happen then?
How to call a api in JavaScript?
Difference Between SOAP and REST API?
Datatypes in JavaScript?
Why collections used,if we have array already ?
What the version you are using in springboot ?
What is the version using in Tomcat ?
What is MIME Type ? DONE
What is POSTMAN ?
@springbootConfiguration having which 2 configuration ,what is the use of it ?
Can we use String as a Key in HashMap ?
Which is the best collection for searching in Java ?
How we change the server in it ?
Difference Between procedure and function ?
Syntax for procedure ?
What is Dependency Injection,and how many ways to achive it, benefits of each ?
Whole CI and CD explanation ?
Difference between request mapping and rest mapping ?
What are the status codes 201 and 401 and other also ?
Any challenge you face in your current Project Recently ?
What is the difference between Authorization and authentication ? DONE
Dyanaic Programming. Dynamic Programming is a technique in computer programming that
helps to efficiently solve a class of problems that have overlapping subproblems and optimal
substructure property.
If any problem can be divided into subproblems, which in turn are divided into smaller
subproblems, and if there are overlapping among these subproblems, then the solutions to
these subproblems can be saved for future reference. In this way, efficiency of the CPU can be
enhanced. This method of solving a solution is referred to as dynamic programming.
Closure in java script
CASCADING TYPE in Hibernate
ALL
PERSIST
MERGE
REMOVE
REFRESH
DETACH
private <T> Set<T> findDuplicates(Collection<T> collection) {
Set<T> uniques = new HashSet<>();
return collection.stream()
.filter(e -> !uniques.add(e))
.collect(Collectors.toSet());
}
Microservices are an architectural style that develops a single application as a set of small
services. Each service runs in its own process.
1.)
Microservices architecture involves breaking a monolithic application into component functions
or services, which are then loosely connected via APIs. This allows for improved scalability,
better fault isolation, and faster time to market.
2.)
Microservices allow for better data security and compliance, as each service is responsible for a
specific task, making it easier to implement security measures at the service level.
3.)
It is possible to change or upgrade each service individually rather than upgrading in the entire
application.
4.)Microservices are independently manageable services.