0% found this document useful (0 votes)
103 views110 pages

Comprehensive Java Concepts Overview

The document covers a wide range of Java concepts including OOP principles, data structures, threading, Spring framework, SQL, and programming challenges. It discusses key differences between various Java components such as Abstract vs Interface, String Buffer vs String Builder, and Array vs ArrayList, while also touching on advanced topics like serialization, synchronization, and design patterns. Additionally, it includes references to Spring Boot, REST APIs, and Agile methodologies, along with practical programming questions and comparisons between HTML versions and CSS standards.

Uploaded by

G.vasudevan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views110 pages

Comprehensive Java Concepts Overview

The document covers a wide range of Java concepts including OOP principles, data structures, threading, Spring framework, SQL, and programming challenges. It discusses key differences between various Java components such as Abstract vs Interface, String Buffer vs String Builder, and Array vs ArrayList, while also touching on advanced topics like serialization, synchronization, and design patterns. Additionally, it includes references to Spring Boot, REST APIs, and Agile methodologies, along with practical programming questions and comparisons between HTML versions and CSS standards.

Uploaded by

G.vasudevan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

Java

Oops concept
Abstract vs Interface
String Buffer vs String Builder
When String and when builder or buffer
Why String is Immutable
Why other datatypes (int, short) are mutable
Static vs Final
Final vs finally vs finalize
Method overriding vs method overloading
Serialization
Synchronization
Array vs arraylist
Arraylist vs Linkedlist
List vs set
Hashmap vs HashTable
ConcurrentModificationException
why Concurrent Hashmap
Internal working of Hashmap new change
collusion Issue
Custom Exception
Some methods of object class
Reason for collision inside hashMap
can we have exception without catch block
Threading
Wait vs Sleep
notify & notifyAll
Garbage Collection
Comparable vs comparator
ThreadSafe
Can we have Parent Exception then sub excepti
Functional Interface with example
throw vs throws
process required to have a class as Singleton
composite key
what is Functional interface and write one example
Java 8 features
can we override static method
static and instance block
static -> instance -> constructor
Linked List
Sorted set & Tree set
BigInt & BigDecimal
AtomicInteger
function(Object) vs funtion(String)
"== vs equals"
[Link]() and [Link]()
Daemon thread
How can I make a field non-serializable
deadlock
Leaders in an array
volatile vs Synchronized
object de-referencing
Y override both equals and hashcode.
How duplicate are avoided in Set
how to make a class imutable
Stream flatMap
can we serialize a static content
design pattern

Spring
Scope in spring
inside web. xml?
why spring
Dependency injection & IOC
how many ways Injection can be achived
Autowire
Controller vs restcontroller
Known annotations
Qualifier
how to handle exception in spring
profiling
@Component vs @Bean

Spring MVC architecture

SpringBoot
RestApi
Write any one restapi class ( restcontroller class)

Sql
Joins
Left join
Write query in left join
Query vs subquery
LIMIT
Index
Bank balence with trancation table
max salary
y view

others
Agile Methodology process
Micro Services

Program questions
Find first non repetitive value in string
programs in stream API
count Occurance of each word or character from a string
count occurrences of each item in list stream jav

HTML vs HTML5
CSS vs CSS3
DOM vs Virtual DOM
Inheritance, Polymorphism, Abstraction, Encapsulation
no multiple inheritance. | non-final,non-static variables.| can have private, protected var.| abstract and non-abstract
syncronized & thread safe vs non-syncronized & not thread safe.

the security, synchronization and concurrency, caching, and class loading.


performance

The finalize() method of Object class is a method that the Garbage Collector always calls just before the deletion/de

Serialization in Java is a mechanism of writing the state of an object into a byte-stream.


Synchronization in Java is the capability to control the access of multiple threads to any shared resource.
fixed-sized
internally uses an array, better for storing and accessing vs doubly linked list | faster | List and Deque | better for m
ordered sequence, duplicate elements vs unordered sequence, doesn’t allow duplicate elements
non-synchronized , one null key and multiple null values vs synchronized, doesn’t allow any null key or value
collections can't be modified while iterated. | same resource accessed by multi thread at a time.
To avoid Concurrency.
16 budget, each has a linked list / balenced tree(when list can't handle the data), find index with hashcode. check e
In hashMap if index of two different key are same, it is called collusion.
Create String param Contructor and call super param constructor.
toString(),finalize(),Hashcode(), equals() ,clone(), wait(), notify()
when 2 distinct keys generate the same hashcode() value
yes by resource try block. or use throws key on method.

Object | releases lock during Synchronization| called only from Synchronized context, final vs Thread, static

compareTo, implemented by Class which need to be compared vs compare, passed as param for

Complier time error ( see one example)

return single_instance;
}
is a combination of two or more columns to form a primary key for a table.
e one example
Stream, lamda, functional interface, Default & Static methods in interface, Optional class.
No as overriding is run-time and static is class based and not runtime
called on class loaded vs called on object creation like constructor.

Linked Lists are not indexed


All element should have implemented comparable.

Can be used in stream to have count |


function(null) this will call function(String) as String is child of Object and child will have high priority.
We can
When a use == operators
program calls the for reference
start() comparison
method, (address
a new thread comparison)
is created and thenand
the .equals() method
run() method for content compar
is executed.
But if we directly call the run() method then no new thread will be created and run() method will be executed as a no
Daemon thread is a low priority thread (in context of JVM) that runs in background to perform tasks such as garbag
Use keyword transient: public transient String description;

An element is leader if it is greater than all the elements to its right side.
[Link]
The reassignment or set null means ref has been "dereferenced". The dereferenced object is now eligible for Garba
If two objects are equal, then they must have the same hash code. If two objects have the same hash code, they m
TreeSet internally uses the HashMap which internally uses the Hashcode to determine the duplicates. If two objects
final class, final member variables, allArgsConstructor, getter alone.
List<List<String>> to List<String>.
we cant, as serializing is a process to stating an object into bytestream.
Singlton, builder, prototype, factory, adaptor, iterator, observer(creational, structural, behavioral)

singleton, prototype, request, session, global-session.


Deployment Descriptor , servlet-mapping

Constructor Injection, Setter injection, Field injection, Lookup Method injection

@requestBody not needed.


Component, ComponentScan, Bean, Qualifier, Autowired, Configuration, Import
NoUniqueBeanDefinitionException | used with autowired and bean. | alternate name will be given in @Component

application-dev and application-qas.


[Link]

troller class)
INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, Self Join, CROSS JOIN

SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name;

Limit 0,1 Offset is like index and it sayd the starting point.
Order the
select column and used
name,sum(case whenalgoritm to retrivethen
transaction='C' data.
amount end) -sum(case when transaction='D' then amount end) a
from tablename group by name
select
2. *from
Views canemployee
be used as where salary=(select
a security mechanism Max(salary) from employee);
3. Views can simplify supporting legacy code

Common or sep

aracter from a string


[Link](animals, "bat");
Map<String, Long> counts = [Link]().collect([Link](e -> e, [Link]()));
[Link]().collect([Link](person -> [Link]()));

[Link]
[Link]
VDOM is abstraction of DOM without browser specific implementation.
Hibernate spring java
How will you connect hibernatenable debug in spring can we overload static method
Hibernate cascade life cycle of thread
Save vs persist

first level cache


hql return type
having vs where

ex is computed for key.


do not prevent the JVM from exiting

hey must have the same hash code.


sql
truncate vs delete vs drop- which will rollback
Scala
[Link]
java 7
java 8 | Functional Program
java 9 to 15
Topic
main
variables
primitive types
float

typecase
implicit
explicit

switch

Constructor

this

static variable

static block

static method

Inner Class

Static Inner Class

Array
Jagged Array

enhanced for
varargs

OOPS

HAS-A

super
diamond problem

Encapculation

boxing - wrapping
unboxing
auto-boxing
auto-unboxing

Abstract

Final

Interface

Anonymous Class

Marker Interface
Functional Interface
Default Method in Interfac

Static Method in Interface

Access Modifier
protected

Exception

try with resource


user defined exception

Scanner

Thread

start()
sleep()
join()
isAlive()
getName() & setName()
getPriority()
currentThread()

Runnable

Synchronized
collection
Collection
Collections

1.2
with Generics 1.5
1.7

Set

Map
HashMap
HashTable

Thread safe Collections

Iterator

Collections

Comparable

Comparator

HashTable

Stream
Lamda Expression

parallelStream()
stream().methods()
map()
reduce()
filter()
forEach()
orElse()
findFirst()
distinct()
predicate Interface

java 9 + APIs
copyOf()
[Link]() | writeStri
predicate Negate
String

Locale Variable Inference

Switch Expression

Text Block
Records

compact constructor

SOLID
Single Responsibility Princip
Open-Closed Principle
Liskov Substitution Principle
Interface Segregation Principle

Dependency Inversion Princi


[Link]
[Link]
[Link]
Syntax / Keyword / Note
PSVM(String args[])
int i = 5;
int(4), byte(1), short(2), long(8), float(4), double(8), boolean(NA), and char(1). type(byte)
float f = 5.5f; | where 5.5 is double. only after adding f suffix it is treated as float.
artematic operation can be done on char even we can assign a number. and whenever we print is will return ASCI v
Note: Adding two byte will result in int.

double d = 5;
int i = (int)5.5;

all case will have same datatype value


string can be passed to switch in java 1.7 and later
The default statement is optional, and it must appear at the end of the switch.
never return anything | no need to mention void in constructor.
it is used to allocate memory.
object will be create and loaded into heap memory.

current instance
Note: The Java ClassLoader is a part of the Java Runtime Environment that dynamically loads Java classes into the
(Permanent Generation section of the heap)
static variable will be class specific and not instance specific.
can be accessed by object-ref or classname.

This will be called only when the class is loaded into JVM by classLoader.

non-static variable can't be accessed inside the static method or static block.

[Link] ref = [Link] InnerClass();


class name Outer$[Link]
[Link] ref = new [Link]();

int num[] = new int[4]; | int num[] = {25,15,35,45};


In 2D array all array will have same number of items. Jagged Array, arrays will not have same number of items.

for(int i:num){}
method declaration | methodName(int ... varName);

Inheritance(child having properties of parent), encapculation(wrapping in class), polymorpysium(doing something in


Coupling(class knowing other class), Cohesion(single well-defined task), Association(1->1,1->many,many->1,many
having a object of other class.
When obj of child class created first super class constructor will be executed and then child class constructor will be
super() is added in each class constructor in first line automatically by compiler if there is no super() or this()
ambiguity

SuperClass obj = new SubClass();


[Link](); this will not work. we can only call the methods in super class if that is over
[Link]

achived by getter and setter


and variable to private

Integer ii = new Integet(2);


int i = [Link]();
Integer ii = 2;
int i = ii;

object of Abstract class can't be created.


Abstract method declearation need to have abstract key word.
no need for abstract class to have abstract method, but if a abstract method present then that class should be abstr

final int i=10 can't be changed. | but final int ii; can be assigned once after that it cant be changed.
final class ClassName{} this cant be extended
final method this method cant be overriden.

all methods are public abstract


can't create object of interface.
All variables are public static final.

ClassName obj = new ClassName(){ sub class implementation };


InterfaceName obj = new InterfaceName(){ sub class implementation };

Interface without any method. | Serializable, Cloneable


Single Abstract Method Interface | Runnable, Comparable, Callable, Function(map), Predicate(filter), Consumer(for
FunctionalInterfaceName obj = () -> { sub class implementation };
FunctionInterface will have one abstrat method and many default methods.
java 8 feature.
Interface InterfaceName{ default methodName(){}}
default can be overriden.
For dymand problem override the method which is abiguity.
for using one method implementation in one of the interface in dymand problem [Link]
If A extends C implements I, I and C have same method then C's implementation will be executed.
Object class methods like equals cant be defined as default methods in interface.

These are not default but can be defined in interface. | java 8 feature.

Class can have final, abstract and public and not private and protected.
same package and child class.

Multiple Catch block.


multiple exception same code block catch(Exception1 | Exception2 e){}
try(BufferReader br= new BR()){} | this doesn't need finally or catch [Link] resource will be closed autometically
constructor with super(str) should be there as Exception class does not have default constructor.
finally will always run. only when JVM exit this will not be executed.
checked and unchecked exception

Scanner scan = new Scanner([Link]);


[Link](); / [Link]();

Ever thread need run() method.


Create a Class extends Thread to create your thread OR implements Runnable.
Thread t1 = new MyThread;
[Link]() will start a thread. execute the code in run method we have defined in extended or implemented class.
[Link](500) will wait for the number of ms and then continue.
[Link](); this will wait untill t1 done with the start() and then only the code after [Link]() will execute.
After start thread will be alive and after join the thread will not be alive.

default 5 | 1 to 10 | 1 high 10 least.


[Link]();

Runnable is a functional interface with run method.


Runnable runnableObject = new RunnableImplementedClass(); Thread t1 = new Thread(runnableObject);
[Link]();

make a method synchronized means only one thread can access the method at a time.
public synchronized
Synchronized block. void methodname(){}
Static synchronization.

topic
Interface
Class

Collection obj = new ArrayList();


Collection<Interger> obj = new ArrayList<Interger>();
Collection<Interger> obj = new ArrayList<>();

Set<> obj = new HashSet<>(); No duplicate and no order


Set<> obj = new TreeSet<>(); No duplicate and sorted order

Map<k,v> obj = new HashMap<>();

Rest all are not thread safe

Iterator obj = [Link]();

[Link](collectionObject);
List is Mutable.

Interface have compareTo method which will be implemented by Objects like Integer. This will have a logic to sort()
Example: (thisValue < other) ? -1 : ((thisValue == other)? 0: 1);
To use sort on a Collection with a GenericObject that GenericObject need to implement Comparable Interface.
Implement the compareTo method based on that sort will work.
This is a Interface. with compare method
Comparator obj = (i, j) -> {};
[Link](collectionObject, comparatorObject);

This is syncronized.

for, iterator, Enhanced for are External Iterator. Stream is Internal Iterator.
->
[Link]().forEach(consumerInterfaceObject);
Consumer Interface is a functional Interface with accept method.
method Ref forEach([Link]::println)
this will create the multi thread and run.
intermidiate method
terminal Method. reduce(initialValue,(result,eachitem) -> {});
intermidiate method
terminal Method.
can be used after optional Method
optionalMethod
intermidiate method
Functional Interface with test method.
filter(PredicateObject).

stream is lazy once findFirst get one value then the intermidiate method will not run for other items.

List , Set, Map has this method. this will create and return a collection immutable having the same values as the pa
Path path = [Link]("./[Link]"); [Link](path,"asdasdasd");
filter([Link]()) | filter([Link](methodRef))
isBlank()
strip()
stripLeading()
stripTrailing()
Stream<String> obj = "asd/nasd/nasd/nasd/n".lines();
"asdasd %s asdasd %d",formatted("Name", 25);

JDK 10
var obj = new ClassName();
java complier will infer the type if we mention var.
var obj = null; (this is not possible)
var can't be used for member variables.

JDK 14}
};
beark; can't be used with switch expression. yield will act like return.
for one line we can use ->

JDK 15
""" content asdasd asdasd """
this 2
line can hav new line tab without escape seqance.
line 3 """
starting """ should be followed by new line.
all operation on string can be done in textBlock.
JDK 16
record RecordName(String stringName){}
record will create Constructor,equals,hashcode,getter,setter,toString methods automatically.
record
} RecordName(String stringName){ override those methods }
}
we can have static variable, block and methods
we can't have instance variable and instance methods.

every Java class must perform a single functionality.


the module should be open for extension but closed for modification.
derived classes must be completely substitutable for their base classes
gation Principle

The principle states that we must use abstraction (abstract classes and interfaces) instead of concrete implementat
on(say what to do and not how it is done)
(has-a), Composition(is-a)

that implementation will be executed.


efault method in the interface
Topic
DDL
DQL
DML
DCL
TCL

SELECT

SELECT DISTINCT

WHERE

condition

ORDER BY

INSERT

NULL

UPDATE

DELETE

SELECT LIMIT
OFF SET in the LIMIT

MIN()

MAX()

COUNT()
AVG()
SUM()

LIKE
Wildcard

IN

BETWEEN

Aliases

JOIN
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Self Join
CROSS JOIN

UNION

UNION ALL

INTERSECT
EXCEPT

GROUP BY

GROUPING SETS
HAVING

EXISTS

ANY

ALL

SELECT INTO

INSERT INTO SELEC

CASE

NULL Functions

Comments

Stored Procedures
CREATE DATABASE

DROP DATABASE
BACKUP DATABASE

CREATE TABLE
DROP TABLE
TRUNCATE TABLE
DELETE v TRUNCAT
ALTER TABLE

RENAME

Constraints

NOT NULL Constrain


UNIQUE Constraint

PRIMARY KEY

FOREIGN KEY

CHECK Constraint

DEFAULT Constraint

CREATE INDEX

DROP INDEX

AUTO INCREMENT
CREATE VIEW

UPDATE VIEW

DROP VIEW

Trigger
CREATE TRIGGER

DROP TRIGGER

Prepared Statement
PREPARE
EXECUTE
DEALLOCATE

PostgreSQL
ILIKE

ON CONFLICT
DO NOTHING
Syntax / Keyword / Note
Data Definition Language - (CREATE, DROP, ALTER, TRUNCATE, COMMENT , RENAME)
Data Query Language - (SELECT)
Data Manipulation Language - (INSERT, UPDATE, DELETE)
Data Control Language - (GRANT, REVOKE)
Transaction Control Language - (COMMIT, ROLLBACK, SAVEPOINT, SET TRANSACTION)

SELECT column1, column2, ... FROM table_name;


SELECT * FROM table_name;
SELECT DISTINCT column1, column2, ... FROM table_name;
SELECT COUNT(DISTINCT column_name) FROM table_name;

SELECT column1, column2, ... FROM table_name WHERE condition;


The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!
Operators (=, <, >, >=, <=, <>, BETWEEN, IN, LIKE).
AND, OR and NOT
SELECT column1, column2, ... FROM table_name WHERE condition1 AND condition2 AND condition3 ...;
SELECT column1, column2, ... FROM table_name WHERE condition1 OR condition2 OR condition3 ...;
SELECT column1, column2, ... FROM table_name WHERE NOT condition;

SELECT column1, column2, ... FROM table_name ORDER BY column1, column2, ... ASC|DESC; Note: for each c
INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);
INSERT INTO table_name VALUES (value1, value2, value3, ...);

NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has
IS NULL / IS NOT NULL

UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;

DELETE FROM table_name WHERE condition;

SELECT column_name(s) FROM table_name WHERE condition LIMIT number;


SELECT * FROM `table_name` LIMIT 1, 2; | 1 is offset and it will be like array index. 2 is limt.

The MIN() function returns the smallest value of the selected column.
SELECT MIN(column_name) FROM table_name WHERE condition;
The MAX() function returns the largest value of the selected column.
SELECT MAX(column_name) FROM table_name WHERE condition;
SELECT COUNT(column_name) FROM table_name WHERE condition; Note: NULL values are not counted.
The AVG() function returns the average value of a numeric column.
SELECT AVG(column_name) FROM table_name WHERE condition;
The SUM() function returns the total sum of a numeric column.
SELECT SUM(column_name) FROM table_name WHERE condition;

SELECT column1, column2, ... FROM table_name WHERE column LIKE pattern;
% Represents zero or more characters
_ Represents a single character
[] Represents any single character within the brackets Note: h[oa]t finds hot and hat, but not hit
^ Represents any character not in the brackets Note: h[^oa]t finds hit, but not hot and hat
- Represents a range of characters Note: c[a-b]t finds cat and cbt
c[!a-b]t finds cot and clt not cat

SELECT column_name(s) FROM table_name WHERE column_name IN (value1, value2, ...);


SELECT column_name(s) FROM table_name WHERE column_name NOT IN (value1, value2, ...);

SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2;
SELECT column_name(s) FROM table_name WHERE column_name NOT BETWEEN value1 AND value2;

SELECTcolumn_name
SELECT column_name ASAS alias_name
aliasname, FROM table_name;
column_name AS [alias name] FROM table_name;
Note: It requires double quotation marks or square brackets if the alias name contains spaces:
SELECT CustomerName, CONCAT(Address,', ',PostalCode,', ',City,', ',Country) AS Address FROM Customers;
RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched records from the left table
FULL (OUTER) JOIN: Returns all records when there is a match in either left or right table
SELECT [Link], [Link] FROM Orders INNER JOIN Customers ON [Link]
SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name;
SELECT column_name(s) FROM table1 RIGHT JOIN table2 ON table1.column_name = table2.column_name;
SELECT column_name(s) FROM table1 FULL OUTER JOIN table2 ON table1.column_name = table2.column_nam
SELECT column_name(s) FROM table1 T1, table1 T2 WHERE condition;
SELECT select_list FROM T1 CROSS JOIN T2;
The CROSS JOIN gets a row from the first table (T1) and then creates a new row for every row in the second table
The columns must also have similar data types
The columns in every SELECT statement must also be in the same order
UNION
SELECT column_name(s) FROM table2;
UNION ALL
UNION operator selects only distinct values by default. To allow duplicate values, use UNION ALL
SELECT column_name(s) FROM table2;
INTERSECT combines result sets of two or more queries and returns distinct rows that are output by both queries.
EXCEPT compares the result sets of two queries and returns the distinct rows from the first query that are not outp

SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s)


SELECT
() COUNT(CustomerID), Country FROM Customers GROUP BY Country;
);
CUBE - All Grouping set auto generated
table_name
GROUP BY CUBE(c1 , c2);
ROLLUP - (d1,d2,d3) asuming d1>d2>d3 creates only (d1,d2,d3), (d1,d2), (d1), ().

HAVING clause was added to SQL because the WHERE keyword cannot be used with aggregate functions(count m
WHERE COUNT()
SELECT this cantFROM
column_name(s) be used for this weWHERE
table_name are using HAVING. HAVING can be used only with GROUP BY.
condition
GROUP BY column_name(s) HAVING condition ORDER BY column_name(s);

The EXISTS
SELECT operator returns
column_name(s) TRUE
FROM if the subquery returns one or more records.
table_name
WHERE EXISTS (SELECT column_name FROM table_name WHERE condition);
FROM Suppliers
WHERE EXISTS (SELECT ProductName FROM Products WHERE [Link] = [Link] AN

returns TRUE
WHERE if ANY of operator
column_name the subquery
ANYvalues meet the condition
(SELECT column_name FROM table_name WHERE condition);
returns TRUE if ALL of the subquery values meet the condition
is used with SELECT, WHERE and HAVING statements
SELECT column_name
WHERE ALL column_name(s)
operatorFROM
ALL table_name WHERE condition;
(SELECT column_name FROM table_name WHERE condition);

SELECT INTO statement copies data from one table into a new table.
SELECT * INTO newtable [IN externaldb] FROM oldtable WHERE condition;
SELECT column1, column2, column3, ... INTO newtable [IN externaldb] FROM oldtable WHERE condition;
If WHERE condition is false an empty new table will be created.

INSERT INTO SELECT statement copies data from one table and inserts it into another table(existing table).
INSERT INTO
INSERT INTO table2
table2 (column1,
SELECT * column2,
FROM table1 WHERE
column3, ...) condition;
SELECT column1, column2, column3, ... FROM table1 WHERE condition;

If there
ELSE is no ELSE part and no conditions are true, it returns NULL.
result
END;
END AS QuantityText
FROM OrderDetails;

IFNULL(),ProductName,
SELECT ISNULL(), COALESCE(), and NVL() + IFNULL(UnitsOnOrder, 0)) FROM Products;
UnitPrice * (UnitsInStock
If UnitsOnOrder have NULL in any record it will be considered 0 as the functions second param is 0.

Single line comments start with --


Multi-line comments start with /* and end with */

A stored procedure is a prepared SQL code that you can save


You can also pass parameters to a stored procedure
CREATE PROCEDURE procedure_name AS sql_statement GO;
EXEC procedure_name;
SELECT * FROM Customers WHERE City = @City
GO;
EXEC SelectAllCustomers @City = 'London';

CREATE DATABASE databasename;


SHOW DATABASES
DROP DATABASE databasename;
BACKUP DATABASE databasename TO DISK = 'filepath';
BACKUP DATABASE databasename TO DISK = 'filepath' WITH DIFFERENTIAL;

CREATE TABLE table_name (column1 datatype, column2 datatype, column3 datatype, ....);
DROP TABLE table_name;
TRUNCATE TABLE table_name;
Delete command places lock on each row requires to delete from a table. | Truncate command places a table and p
ALTER TABLE table_name ADD column_name datatype;
ALTER TABLE table_name DROP COLUMN column_name;
ALTER TABLE table_name MODIFY COLUMN column_name datatype;
ALTER TABLE table_name RENAME TO new_table_name;
ALTER TABLE table_name RENAME COLUMN old_name TO new_name;
....
);
ADD and DROP Constraint is possible with ALTER TABLE
NOT NULL constraint
UNIQUE (ID) enforces a column to NOT accept NULL values.
); CONSTRAINT UC_Person UNIQUE (ID,LastName)
);
Primary keys must contain UNIQUE values, and cannot contain NULL values
Same syntax KEY
FOREIGN as UNIQUE.
(PersonID) REFERENCES Persons(PersonID)
); REFERENCES Persons(PersonID)
); CHECK (Age>=18)
); CONSTRAINT CHK_Person CHECK (Age>=18 AND City='Sandnes')
); City varchar(255) DEFAULT 'Sandnes'
);

CREATE INDEX index_name ON table_name (column1, column2, ...);


CREATE UNIQUE INDEX index_name ON table_name (column1, column2, ...);
ALTER TABLE table_name DROP INDEX index_name;

PRIMARY KEY (Personid)


);
Only one AUTO INCREMENT field for one table.
CREATE VIEW view_name AS SELECT column1, column2, ... FROM table_name WHERE condition;
A view always shows up-to-date data! The database engine recreates the view, every time a user queries it.
A view can be updated with the CREATE OR REPLACE VIEW statement.
CREATE OR REPLACE VIEW view_name AS SELECT column1, column2, ... FROM table_name WHERE conditio
DROP VIEW view_name;

Triggers
FOR EACHare ROW
a particular type of stored procedure associated with a specific table.
<trigger body>;
<trigger time > (BEFORE or AFTER)
<trigger
END IF; event>
// (INSERT, UPDATE or DELETE)
delimiter ;
DROP TRIGGER <trigger name>;

PREPARE stmt_name FROM preparable_stmt;


EXECUTE stmt_name [USING @var_name [, @var_name]....] | EXECUTE stmt1 USING @a, @b;
{DEALLOCATE | DROP} PREPARE stmt_name;

ON CONFLICT (id) DO UPDATE


SET level = [Link] + 1;
[Link]
[Link]

oned default is ASC.


xt row for in the first table (T1) and so on.
Topic
7 steps
1
2
3
4
5
6
7
load driver
register the driver
establish the connection
create the statement
execute the query
Process Result
Close

Prepared Statement

forName()

DAO
[Link]

Syntax / Keyword / Note

Import package ([Link].*)


load and register the driver ([Link])
establish the connection (Connection)
create the statement (Statement, Prepared Statement, Callable Statement).
execute the query
Process Result
Close the Connection and statement.
mysql-connector-java
[Link]("[Link]"); | [Link](new [Link]());
.getConnection("jdbc:postgresql://localhost:5432/testdb",
"postgres",
" ADDRESS"123");CHAR(50), " +
" SALARY
[Link](sql); REAL)";
ResultSet rs = [Link]( "SELECT * FROM COMPANY;" );
[Link]();
}
[Link]();
[Link]();

String sql="insert into emp values(?,?,?)";


PreparedStatement stmt = [Link](sql);
[Link](1,value);
[Link](2,value);
[Link](3,value);
[Link]();

will load the class into classloader that will execute the static block.
[Link]("ClassName");

This is a data pattern.


Topic
Maven

BeanFactory
ApplicationContext

[Link]

Bean Property

Construtor Injection

Annotation Based Configuration


@Component

[Link]

@Autowired

AnnotationConfigApplicationContex

@Configuration

@ComponentScan

@Primary
@Qualifier

Configuration Inhertance

@PathVariable
[Link]
[Link]
Syntax / Keyword / Note
It is a java build tool

using new keyword , will lead to tight coupling.

ApplicationContext context = new ClassPathXmlApplicationContext("[Link]");


ClassName obj = (ClassName)[Link]("beanId");
[Link]() will return an Object type so we need to type case.
<bean id="beanId" class="com. ... ClassName"></bean>
</beans>
<property name="memberVariableName" value="Value"></property>
<bean>
We need setter method to use property tag to set value to memeber varable.
<constructor-arg value="Value"></constructor-arg>
<bean>
We need constructor with params to use constructor-arg tag to set value to memeber varable.
Order should be followed.

@Component on class for which we are going to create bean


@Component("beanName")
<context:component-scan base-package=""></context:component-scan>
ApplicationContext context = new ClassPathXmlApplicationContext("[Link]");
ClassName obj = (ClassName)[Link]("classNameWithFisrtLetterAsLowwerCase");

@Autowired on memberVariable of class will create a bean of memberVariable and assign to it.

ApplicationContext context = new AnnotationConfigApplicationContext([Link]);


ClassName
} obj = [Link]([Link]);
}
@Bean need without Component Scan

}
With this we need to mention @Component on Classes.

This will clear the ambiguity issue. between two class inherts one interface and we request for Interface's Bean.
Class with Primary annotation's Bean will be return.
@Autowired
@Qualifier("beanName")
@Configuration
@import({[Link], [Link]})

return "ID: " + id;


}
Topic

[Link]

configure file

@Controller
@RequestMapping

[Link] ->
AbstractAnnotationConfigDispatcherServletInitializer

configure file

@RequestParam

Component Annotations
[Link]

Syntax / Keyword / Note


DispatcherServlet will be created auto by Spring MVC.

[Link] deployment descriptor


client request -> (server[webcontainer-tomcat([Link])])
client request ->[Link] -> dispatcherServlet(frontController) -> Controllers.

</servlet-mapping>
</web-app>

[Link]
</bean>
</beans>

This will have the mapping. by this dispatcherServlet will know for which request which controller need to be called.
Annotation on methods for path mapping

public
} class WebXmlReplaceClass extends AbstractAnnotationConfigDispatcherServletInitializer
}

[Link] -> ConfigClassName


@ComponentScan({"basepackage"})
ConfigClassName{}
@RequestMapping()
methodName(@RequestParam("argName") dataType paramName){}

@Controllor, @Service, @Repository, @Component


ontroller need to be called.

vletInitializer
Topic
SpringApplication

Spring Container

@scope

application property

get application property into java c

profiling
[Link]

Syntax / Keyword / Note


@SpringBootApplication
@Configuration, @ComponentScan, @EnableAutoConfiguration
ConfigurableApplicationContext context = [Link]([Link], args);
[Link]([Link]);

When the application start run all beans will be created and held in Spring Container.(Scope: Singleton)
@Component
@Scope(value="prototype")
by default it will be singleton
In Singleton Bean will be created when the application start to run.
In Prototype the Bean will be create whenever we call getBean();

This will be in resources folder


[Link]=${HOME}/bucket
@Value("${[Link]}")
private
..... String userBucketPath;
}
[Link]();

[Link] / [Link]
mockito
Topic

@Test
@DisplayName
@RepeatedTest(5)
@ParameterizedTest
@ValueSource
@MethodSource

@Disabled

Assertions

JUnit Flow

@BeforeAll
@AfterAll
@TestInstance(Lifecylce.PER_CL

@Nested

Mockito
Mockito
mock
when()
verify()
[Link]
[Link]/watch?v=flpmSXVTqBI
[Link]
Syntax / Keyword / Note

JUnit will treat the mathod as test.


@DisplayName("Name instead of method name used by JUnit")
method will be executed 5 times
Run the test many times with different param values.
@ParameterizedTest
@ValueSource(strings = {"0123456789", "1234567890", "+0123456789"})
@MethodSource("phoneNumberList")
the method will return a list of values and that will be used. for param each time.
The method will be disabled.

Class in Junit
assertFlase, assertEquals, assertThrows
assertFalse([Link]().isEmpty());
assertEquals(1, [Link]().size());
[Link](null, "Doe", "0123456789");
});

@BeforeAll, @BeforEach, @Test, @AfterEach, @AfterAll

This will be called before the instance of the class is created, So it should be static method.
This should also be a static method.
Will create only one instance to run all the test. And @BeforeAll and @AfterAll can be non-static.

Inner Test Class

It is a class
method | [Link]([Link]);
[Link]([Link](param)).thenReturn(valueToBeReturned);
verify([Link](param));
Topic
REST
REST API

stateless

REST Resource
URI
URL
URN

HTTP Methods

idempotent
POST vs PUT

Rest Template
[Link]
[Link]

Syntax / Keyword / Note


REpresentational State Transfer
RESTful web service | stateless client-serve architecture and it uses HTTP
medium of communication is messaging.
client request and server responce are not depended on other
server will not save any client data
If client send a context the server
This is what we will get or set by using rest API.
Uniform Resource Identifier
Uniform Resource Locator
Uniform Resource Name
Essentially URN vs. URL is "what" vs. "where".

Way to intract to server


CRUD - Create = POST, Retrival = GET, Update = PUT, Delete = DELETE
If a request is given for mony times and response is the same and there is no memory change in the Server side.
POST != idempotent where PUT == idempotent.
In DELETE as for the first time only the data clear after that the same request will respond the same it is idempoten

PUT method uses the request URI to supply a modified version of the requested resource which replaces the origin
whereas the PATCH method supplies a set of instructions to modify the resource.

[Link]('url',[Link])
Topic
Types of Data Structures
Non-Primitive Data structure

Major Operations

Types of algorithm
Search Algorithm

Array and 2D Array

Linked List
Types of Linked list

Skip list
Stack
Standard Stack Operations

Queue
Enqueue:
Dequeue
Other Operations

Types of Queue
Circular Queue
Priority Queue
Types of Priority Queue

Deque
Operations

Tree
term

Types of Tree

Binary Tree
Full/ proper/ strict Binary tree
Complete Binary Tree

Perfect Binary Tree


Degenerate Binary Tree

Balanced Binary Tree


Binary Search Tree

AVL Tree
RR Rotation

LL Rotation
B Tree

Graph
Searching

Sorting
Bubble sort Algorithm

Bucket Sort
[Link]

Syntax / Keyword / Note


Primitive(int) & Non-primitive(Array) data structure
Linear & Non-linear data structure
Static data structure & Dynamic data structure

Traversing, Searching, Sorting, Insertion, Updation, Deletion, Merging

A stack is an ADT (Abstract data type) which uses either arrays or linked list data structure for the implementation.

Search Algorithm, Sort Algorithm


Linear search, Binary search

Singly Linked list, Doubly Linked list, Circular Linked list, Doubly Circular Linked list, Skip list
LIFO (Last-In-First-Out)
push, pop, isEmpty, isFull, peek, count, change, display
peek(): It returns the element at the given position.
change(): It changes the element at the given position.
display(): It prints all the elements available in the stack.

First In First Out list.


The enqueue operation is used to insert the element at the rear end of the queue. It returns void.
The dequeue operation performs the deletion from the front-end of the queue. It also returns the element which has
Peek, isfull, isempty

Linear
If Queue,
the rear Circular
reaches Queue,
to the PriorityofQueue,
end position Deque
the Queue then there might be possibility that some vacant spaces are left
So, to overcome such limitations, the concept of the circular queue was introduced.
The element with the highest priority would come first in a priority queue
Ascending order priority queue, Descending order priority queue
poll, add

Double Ended Queue


enqueue_front, enqueue_rear, dequeue_front, dequeue_rear, getfront, getrear

Root, Child node, Parent, Sibling, Leaf Node, Internal nodes, Ancestor node,Descendant
Number of edges, Depth of node x(root to x), Height of node x(x to leaf)

General tree, Binary tree, Binary Search tree, AVL tree, Red-Black Tree, B Tree, B+ Tree

0 to 2 children
0 or 2 children.
The complete binary tree is a tree in which all the nodes are completely filled except the last level. In the last level, a
In a complete binary tree, the nodes should be added from the left.

A tree is a perfect binary tree if all the internal nodes have 2 children, and all the leaf nodes are at the same level.
The degenerate binary tree is a tree in which all the internal nodes have only one children.

The balanced binary tree is a tree in which both the left and right trees differ by atmost 1. For example, AVL and Re
Tree is said to be balanced if balance factor of each node is in between -1 to 1, otherwise, the tree will be unbalanc
A graph can be defined as group of vertices and edges that are used to connect these vertices.
Directed and Undirected Graph

Path, Closed Path, Simple Path, Cycle, Connected Graph, Complete Graph
Linear Search, Binary Search

Swap 2 element if need, loop through untill n-1 times. Ever loop will move the largest item to last index and next lar
[Link]
rom the front-end.

which cannot be utilized.


st be as left as possible.
e balanced binary tree.
e balanced.
Topic
Design patterns

Classification of patterns

Creational patterns

Factory Method
Abstract Factory
Singleton

Prototype
Builder

Structural patterns
Proxy

Flyweight

Behavioral Design
Observer
Iterator
[Link]
[Link]

Syntax /patterns
Design Keyword / Note
are typical solutions to commonly occurring problems in software design.
They are like pre-made blueprints that you can customize to solve a recurring design problem in your code.
Common for OOPLs
Creational patterns, Structural patterns, Behavioral patterns

Way to create Object


Factory Method, Abstract Factory, Builder, Prototype, Singleton

Factory Class will create and return the Object. Main class will call the create method in the Factory Class we creat
Factory of Factory.
private constructor, private static ClassName var = new ClassName();, only getter for the var.
above one is egar method.
lazy load the new key word will be in getter method with a conditional check.
create a clone of an object.
new [Link]().setVar().build();

Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy


Pre-requisation like auth and check before original object is called.
Subject – is an interface that exposes the functionality available to be used by the clients.
Real Subject
Proxy – hides–the
is areal
class implementing
object Subject
by extending it andand it is communicate
clients the concrete implementation that
to the real object vianeeds to beobject.
this proxy hidden behin
Usually, frameworks create this proxy object when the client request for the real object.
Use: Auth, Cache,Logging

a shared object that can be used in multiple contexts simultaneously. The flyweight acts as an independent object i

Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visit
DOM
JS will access the DOM not HTML.
Topic
CSS Selectors

CSS Universal Selector

Combinators

Pseudo-classes

Pseudo-elements

Attribute Selectors

Cascading Order

CSS comment

Backgrounds

padding / margin shortha

outline-offset
position Property
static
relative

fixed
absolute
sticky

inline-block

link

CSS Counters

CSS Units

Specificity(priority)

float and clear


float
clear
Syntax / Keyword selectors
Pseudo-elements / Note (select and style a part of an element)
Attribute selectors (select elements based on an attribute or attribute value)

universal selector (*) selects all HTML elements on the page.


adjacent sibling selector (+)
general sibling selector (~)

A pseudo-class
Style visited andisunvisited
used to define a special state of an element.| :hover :focus :first-child
links differently
Style an element when it gets focus

A CSSthe
Style pseudo-element is used
first letter, or line, of antoelement
style specified parts of an element. | ::first-letter ::first-line ::before ::after
Insert content before, or after, the content of an element

[attribute] selector is used to select elements with a specified attribute.


a[target] | a tag with target attribute.
[attribute="value"] selector is used to select elements with a specified attribute and value.
[attribute~="value"] selector is used to select elements with an attribute value containing a specified word.
[attribute|="value"] selector is used to select elements with the specified attribute starting with the specified value. |
[attribute^="value"] selector is used to select elements whose attribute value begins with a specified value. | select
[attribute$="value"] selector is used to select elements whose attribute value ends with a specified value.
[attribute*="value"] selector is used to select elements whose attribute value contains a specified value.
External and internal style sheets (in the head section)
Browser default

A CSS comment is placed inside the <style> element, and starts with /* and ends with */:

background-color : rgb(255,0,0) | (rgb, rgba,hex,hsl)


background-image : url("[Link]");
background-repeat | repeat-x,repeat-y, no-repeat
background-attachment | fixed, scroll
background-position | right, top, right top
background (shorthand property)
background-attachment
background-position

top, right, bottom, left

outline will come between margin and border


outline-offset property adds space between an outline and the edge/border of an element. The space between an e
Static positioned elements are not affected by the top, bottom, left, and right properties. | default.
relative the
Setting is positioned
top, right, relative
bottom,to its left
and normal position.
properties of a relatively-positioned element will cause it to be adjusted away
Other content will not be adjusted to fit into any gap left by the element.
fixed is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolle
absolute
A is positioned
sticky element togglesrelative to the
between nearest
relative andpositioned ancestoron
fixed, depending (instead of positioned
the scroll position. relative to the viewport, like
It is positioned relative until a given offset position is met in the viewport - then it "sticks" in place (like position:fixed)
we must also specify at least one of top, right, bottom or left for sticky positioning to work.

display: inline-block allows to set a width and height on the element.

a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!
a:active MUST come after a:hover in the CSS definition in order to be effective! Pseudo-class names are not case-s

CSS counters
content aregenerated
- Inserts like "variables".
contentThe variable values can be incremented by CSS rules (which will track how many
counter() or counters() function - Adds the value of a counter to an element

vmax Relative to 1% of viewport's* larger dimension


% Relative to the parent element

Start at 0, add 1000 for style attribute, add 100 for each ID, add 10 for each attribute, class or pseudo-class, add 1

float property is used for positioning and formatting content e.g. let an image float left to the text in a container. | left
When- The
both we use the float
element property,
is pushed andboth
below we want the right
left and next floated
elementelements
below (not on right or left), we will have to use the c
inherit - The element inherits the clear value from its parent
x but select top-xxx

line is transparent.
name or pseudo-element.
Crash 1
full course
Topic
Basics

Statement
Comment

Variables

Constant

Primitive Type

Reference Type
Object

this

Arrays
Operators

Control Statement
Conditional

loop

Functions

Types of function

this

try catch

DOM manipulation
document is WEB API not j
Timing Function
setTimeout()

clearTimeout()

setInterval()

clearInterval()

getComputedStyle()

reduce for each

hoisting
[Link]
[Link]
Syntax / Keyword / Note
Chrome has v8(JavaScript engine)
FireFox has SpiderMonkey(JavaScript engine)
Node is a C++
JavaScript is a program
languagethat hason
based a JavaScript
[Link] V8 (chrome's
A standard js engine).
for scripting languages like JavaScript, JScript is ECMA
JavaScript is considered as one of the most popular implementations of ECMAScript.
Put script tag at the end of elements in body. so the element will be rendered first rather than js computation.
scrpit will be included in head tg if js used from outside.
var a =8;
//
/* */

var & let can be used to declare a variable.


var is function scoped and let is block scoped
var global variable will be attached to window object. let will not do that.
variable default value = undefined.

const can be used to declare a variable.

string
number
boolean
undefined
null | type of null is object

{} | json
var obj = {key:value, functionName: funtion(){}, ...};
var varName = new TypeName(args);
var varName = new String(); typeof varName -> object.
delete [Link]; will remove the key for that object.
this inside object ref to that current object instance.
this in general ref to window object

[] | type of Array is object


[Link]() size can be changed and diff type value can be saved.
var ary = [values] | var ary; ary = new Array(values);
append value [Link](), prefix value [Link](), inject [Link](index,deleteCount, values...)
array of object find | var found = [Link](element => [Link] == value); | found will have the element.
findIndex will return index.
remove value [Link](), [Link](), [Link](index, deleteCount)

Arithmetic
Comparison
Logical or Relational
Assignment
Conditional | Trinary [?:]
String [+]
Type [typeof, instanceof]
Bitwise
spread | ...varName
rest | function functionName(...args) | rest param should be last in function declaration

if- else
switch case (number,boolean,string)
for for(int x=10, x>=0; x--){}
while
do .. while do{}while();
for...in
break
continue

function functionName(param,param,...){}
parameter is at the function declearation
argument is at the function calling statement.
no need to specify the type return by the function.
every function has a array called arguments which will have a values of all the params passed to the function.
default param function functionName(param = defaultValue){}
[Link](obj, param1, param2) | this will ref to obj inside the function
[Link](obj, [param1, param2]) | this will ref to obj inside the function
[Link](obj) | this will not call the function. it will return a function object.

var e = new Error("") this is an error


whenever you throw it. it is called exception.
throw new Error("error message");

<button onclick="functionName()">
[Link]();
[Link]();
[Link]();
execute a set a statement ONCE after a time interval
var ID = [Link](functionName,5000);

clear timer set with setTimeout()


clearTimeout(ID) | ID is the value return by setTimeout();

execute a set a statement REPEATLY after a time interval


var ID = [Link](functionName,5000);

clear timer set with setInterval()


clearInterval(ID) | ID is the value return by setInterval();

[Link]([Link]()).getPropertyValue("opacity");
[Link]([Link](),"::after").getPropertyValue("height");

[Link]
[Link]

[Link](), [Link](), [Link]()


template literals ` asd ${variableName}`
auto moving function declaration to top on compile.
official site
tutorial 1
tutorial 2
crash
Topic
Set up
CDN Package
npm
Vue CLI

Vite

Binding Text
{{}}
Data
v-text

Binding HTML tag


v-html

Binding Attribute
v-bind
class binding

conditional binding
style binding
v-bind shorthand

Conditional Rendering
wrap html content
List Rendering

object iteration

key attribute

Methods

Event Handling

shorthand
event object

multiple methods on single ev

Two way binding

Modifier
Trim
Number
lazy
multi modifier
prevent
key
v-once
v-pre

Computed Properties

Method vs Computed

Computed Setter

Watch
Immediate

Deep
[Link]
[Link]
[Link]
[Link]
Syntax / Keyword / Note
[Link] check src in the video
<script src="[Link]
npm install vue@next
npm install -g @vue/cli
vue create <project-name>
npm run serve
npm init vite-app <project-name>

<html-tag>{{variabel-name}}<html-tag>
},
}
<h1 v-text="variable-name"></h1>
tag child will be completly replaced by v-text do it has to be empty.
Note: {{}} is faster than v-text.

<div v-html="variable-name"></div>
in js variable-name = "<b>text<b>"

<input v-bind:id="variable-name" />


v-bind:class="var" and class="classname" can be used in same in tag and it will add all the classes in both of them
v-bind:class="[var,'classname']"
v-bind:class="{classname: boolean ,classname: boolean-expression-condition}"
v-bind:class="booleanVar?varName1:varName2"
v-bind:style="{color: varName, fontSize: varName}"
v-bind:attribute="varName" => :attribute="varName"

v-if, v-else, v-else-if, v-show


<div v-if="varName"><content many html elements></div>
<template v-if="varName"><content many html elements></template>
template tag can be used to wrap html content without rendering into DOM.
where div will create a element in DOM.
v-show will render the element into DOM and set display:none
v-for
v-for="name in names"
v-for="(name,index)
{{ key}}: {{ value }} in names"
</div>publishedAt: '2016-04-10'
}
it is used by the Vue virtutal DOM to identify the nodes when new list of nodes diffing with old.
key should be assigned unique value for each item in the iterable.
Note that it’s not recommended to use v-if and v-for together.
WE can use template to warp v-for over v-if
recomanded method use computed for v-for and omit the v-if.
},
}
<html-tag>{{add(2,3)}}<html-tag>
Note: dont use arrow funtion
methodName: (num) => {}; if we use this [Link]-name can be get. as the vue binding of data will not be there

v-on
<button v-on:click="method-name/ logic">label</button>
<button v-on:click="method-name(args)/ logic">label</button>
v-on:click="method-name" => @click="method-name
methodName(event){ [Link](event);},
},
in template if we pass arg then event will not be passed automatically
to pass event methodname(args,$event)

<button v-on:click="method-name1(args),method-name2(args)">label</button>

v-model
<input id="id" v-model="varName" />
note for checkbox group and radiogroup mention the v-model in each tag the same the array and var will update pro

<input id="id" [Link]="varName" />


<input id="id" [Link]="varName" /> | entered value will be stored in var as number rather than string.
<input id="id" [Link]="varName" /> | will update the var only on change event trigger.
<input id="id" [Link]="varName" />
<form @[Link]="method"> | prevent default event function and call only the method.
<input id="id" ="varName" @[Link]="enterKeyUpMethod" />
element rendered once and will not be rerendered.
this skip compilation for the element content.
<h1>{{varName}}</h1> => value | <h1 v-pre>{{varName}}</h1> => {{varName}}

}
}

both return the value once the depend var value change
Computed will be cached so if something in-depended of the computed is changed the result will not be re-calculate
This improve performance.
Computed will execute only any depended var change.
}
}

}
}}
}"
if immediate is set to true watch will be called on the page load.

If we watch an object and it's key's value updated then watch won't be called.
object { key: "value"}.
for this to be watched we need to set deep to true like immediate.
For array also same thing applies.
Basic
cheat sheet
continue
this is enough
Topic
Version control system

Git Configuration
end of lines

Config Level

help

git init

Work flow

Staging files

Viewing the status

Committing the staged fil

Skipping the staging area

Removing files

Renaming or moving files


[Link]
[Link]
[Link]
[Link]
Syntax / Keyword / Note
Central and Distributed | GIT is distributed.
git confg --global [Link] bharanidhars.b@gmail
git confg --global [Link] "code --wait"
Carry Return or Line feed
git confg --global [Link] true(window) | input(mac or linex)
System | all user
Gloabal | all repo of current user
Local | current repo

git <> -help

create a git repo on the current folder by creating .git folder.

Local -> Staging(add) -> Repo(commit)


Note: after commit staging will not be empty it will have the latest staged changes.
git add . # Stages the current directory and all its content
git add -A # Stages all changes in local dir
git status # Full status
git status -s # Short status
git commit -m “Message” # Commits with a one-line message
git commit # Opens the default editor to type a long message

git commit -am “Message”


git rm --cached [Link] # Removes from staging area only

git mv [Link] [Link]


this will renamed and stage the file.
[Link]
JSON (JavaScript Object Notation)
A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

Refer site
d, struct, dictionary, hash table, keyed list, or associative array.
quence.
[Link]
Topic
regex
Flag
global
case insensitive

/[0-9]{5}/
/[0-9]{0,20}/
/[0-9]+/
\d
\w
\s
\t
[^a-b]
^
$
() parts in regex
()?
[Link]
Syntax/ Note
/<regex>/flag | multiple flags are allowed /<regex>/gi

/<regex>/g | match all if mentioned, if not only the first set will be find.
/<regex>/i

5 digits
0 to 20 digits
any number of digits
[0-9]
match any word cahr [a-z][A-Z][0-9]
match whitespace (space or tab)
tab
not a to b
start point
end point
email /([a-z A-Z 0-9\.-]+)@().()/
optional
Topic
Syntax / Keyword / Note
Mango DB [Link]
The Future interface is more useful if you submit a Callable to the pool. The return value of the call met
Execute vs S
double checkDouble-checked locking is the practice of checking a lazy-initialized object's state both before and after
how can you improve the efficiencyof DAO layer [Link]

jpa repositor[Link]
how to call [Link]
how to defin [Link]

Virtusa
spring batch
Oracle
The return value of the call method will be returned when you call [Link]. If you don't maintain a reference to the Future, th

ect's state both before and after a synchronized block is entered to determine whether or not to initialize the object

[Link]?m=1
eference to the Future, there is no difference.

ze the object

You might also like