Telegram Web
The default value of Boolean is False
πŸ‘3
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Data Type
Default Values

Byte
0

Short
0

Int
0

Long
0

Float
0.0

Double
0.0

Boolean
false

Char
\u0000β€² or null

Join us @Compu
πŸ‘33πŸ”₯3πŸ‘1
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Why use inheritance in java
For Method Overriding (so runtime polymorphism can be achieved).
For Code Reusability.
Terms used in Inheritance
Class: A class is a group of objects which have common properties. It is a template or blueprint from which objects are created.
Sub Class/Child Class: Subclass is a class which inherits the other class. It is also called a derived class, extended class, or child class.
Super Class/Parent Class: Superclass is the class from where a subclass inherits the features. It is also called a base class or a parent class.
Reusability: As the name specifies, reusability is a mechanism which facilitates you to reuse the fields and methods of the existing class when you create a new class. You can use the same fields and methods already defined in the previous class.
join us @Compu
πŸ‘5❀2πŸ₯°2
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
If you want to print a welcome message before the main method is executed in Java, a static block is the best place to do that. What is a static block? A static block is nothing but a code block just like instance block. The static block does not depend on any object.

Join us @Compu
πŸ₯°5πŸ‘2
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
A class can have any number of static initialization blocks. The execution of multiple static blocks will be in the same sequence as written in the program.

Join us @Compu
πŸ‘7
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Functional Interface in Java is also called Single Abstract Method (SAM) interface. From Java 8 onwards, to represent the instance of functional interfaces, lambda expressions are used. Lambda expressions are anonymous (don't have names) shortcode blocks that can take parameters and return a value just like methods.

Join us @Compu
πŸ”₯4❀1πŸ‘1
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Synchronization in java is the capability to control the access of multiple threads to any shared resource. In the Multithreading concept, multiple threads try to access the shared resources at a time to produce inconsistent results. The synchronization is necessary for reliable communication between threads.

Join us @Compu
πŸ‘12❀5πŸ”₯2
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Default methods are methods that can have a body.
The most important use of default methods in interfaces is to provide additional functionality to a given type without breaking down the implementing classes. Before Java 8, if a new method was introduced in an interface then all the implementing classes used to break.
Join us @Compu
πŸ‘15❀1
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️

The Predicate in Java 8 is one of the types of Functional Interfaces. Functional Interfaces were introduced in Java 8 to support functional programming in the object-oriented world of Java. The Predicate is one of them, which allows programmers to test a specific condition imposed on values or objects.

Join us @Compu
πŸ‘8
πŸ‘4
😁1
πŸ‘20❀7
πŸ‘17
πŸ‘13❀1
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
What is the cloud? Why cloud?
The short answer is that it's somewhere at the other end of your internet connection – a place where you can access apps and services, and where your data can be stored securely. The cloud is a big deal for three reasons:
It doesn't need any effort on your part to maintain or manage.

It's effectively infinite in size, so you don't need to worry about it running out of capacity.

You can access cloud-based applications and services from anywhere – all you need is a device with an internet connection.

This is important because there's a shift going on from office-based work to working on the home or move.

How cloud computing works

With a cloud app, you just open a browser, log in, and start working.

That means a field sales representative using cloud-based CRM can get all the information they need from their mobile device.

Join us @Compu
πŸ‘21πŸ”₯3❀1
πŸ‘26πŸ₯°2πŸ‘1
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
Bean life cycle in Java Spring

The lifecycle of any object means when & how it is born, how it behaves throughout its life, and when & how it dies. Similarly, the bean life cycle refers to when & how the bean is instantiated, what action it performs until it lives, and when & how it is destroyed. In this article, we will discuss the life cycle of the bean. 
Bean life cycle is managed by the spring container. When we run the program then, first of all, the spring container gets started. After that, the container creates the instance of a bean as per the request, and then dependencies are injected. And finally, the bean is destroyed when the spring container is closed. Therefore, if we want to execute some code on the bean instantiation and just after closing the spring container, then we can write that code inside the custom init() method and the destroy() method.


Join us @Compu
πŸ‘13❀3
❀2πŸ‘2
✍️✍️......πŸƒπŸƒπŸƒ......✍️✍️
What is ApplicationContext?
ApplicationContext is an interface for providing configuration information to an application. There are multiple classes provided by springframework that implements this interface and helps us use configuration information in applications. ApplicationContext provides standard bean factory lifecycle capabilities. An important capability which we will be using in below code example is, class implementing ApplicationContext should scan for ApplicationContextAware beans and invoke setApplicationContext by passing an implementation of its instance.

Join us @Compu
πŸ‘8πŸ₯°5
2025/07/14 17:26:11
Back to Top
HTML Embed Code: