Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
olymorphism in which the response to a function is determined at the compile time. It is also known as compile time polymorphism. In static polymorphism, the response to a function is determined by the JVM based on the object's type. The process of static polymorphism is also known as early binding or overloading.

Dynamic Polymorphism: Dynamic polymorphism is a type of polymorphism in which the response to a function is determined at the runtime. It is also known as runtime polymorphism. In dynamic polymorphism, the response to a function is determined by the JVM based on the actual object passed at the runtime. The process of dynamic polymorphism is also known as late binding or overriding.


Q16.) string vs string builder vs string buffer in java

String:
A String is an immutable object in java. It means once the object is created its content cannot be changed. The object is stored in the String pool. Whenever a new object is created with the same value as an existing object, the reference of the existing object is returned instead of creating a new object.

StringBuilder:
A StringBuilder is a mutable object in java. It means the content of the object can be changed. It is not stored in the String pool. A new object is created each time.

StringBuffer:
StringBuffer is also a mutable object in java. It is similar to StringBuilder but the only difference is that the StringBuffer is thread-safe. It means it is synchronized and can be used in multi-threaded environment. It is slower than StringBuilder.


Q17.) what is collection

Collection in Java is a framework that provides an architecture to store and manipulate the group of objects. Java Collection framework provides many interfaces (List, Set, Queue, Deque etc) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet etc).


Q18.) exceptional handling :-


Exception handling in Java is the process of responding to the occurrence, during the execution of a program, of exceptions – anomalous or exceptional conditions requiring special processing – often disrupting the normal flow of program execution.

Java provides a powerful exception handling mechanism that allows the programmer to separate the normal flow of the program from the code that handles the exceptional conditions.

In Java, an exception is an object that represents an unusual or exceptional event that has occurred within a method. The exceptional event is usually something that the programmer did not anticipate, such as a division by zero or a file not found.

When an exceptional event occurs, an exception object is created and thrown. This object contains information about the exceptional event, such as its type, the state of the program when the event occurred, and other relevant data.

The programmer can then catch the exception object and use it to figure out what went wrong and how to fix it. In Java, this is done using the try/catch statement.

The try/catch statement consists of two parts: the try block and the catch block. The try block is the code that is executed and is followed by one or more catch blocks. Each catch block contains code that handles a different type of exception.

If an exception is thrown, the Java runtime system looks for the catch block that can handle the exception. If a matching catch block is found, the exception is passed to the catch block and the code inside the catch block is executed, otherwise the exception is propagated up the call stack, until a matching catch block is found or the program terminates.

Exception handling in Java is an important part of writing robust and reliable code. Proper exception handling can help you identify and fix errors quickly and efficiently.
already explained realtime example for these concepts in sunday session
10am-3pm
Keep SMART tracking on your goals 😊
CrudRepo

1.save(S entity);

entities);

3.findById(ID id);

4.existsById(ID id); 5.findAll();

6.findAllById(Iterable<ID> ids);

7.count();

8.deleteById(ID id); 9.delete(Entity)

10.deleteAll(Iterable<? extends T> entities);

11.deleteAll()
JpaRepository

->JpaRepository interface given Spring Data JPA Module. ->The Use of JpaRepository is To Perfrom CRUD operations and sorting and paginations operation with Any relational Data base.

IMPLEMENTED METHODS

1.findAll();

2.findAll(Sort sort); 4.saveAll(Iterable<S> entities);

3.findAllById(Iterable<ID> ids);

5.flush();

6.saveAndFlush(S entity);

7.deleteInBatch(Iterable<D entities):

8.deleteAllInBatch():

9.getOne(ID id); 10.findAll(Example<S> example);

11.findAll(Example<S> example, Sort sorty,
👍2
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
Forwarded from SathyaReact
PUT URL
Forwarded from SathyaReact
STS zip file