Posts

Showing posts from March, 2020

Control statements

Image
                                      Control statements Control statements :- A control statement works as a determiner for deciding the next task of the other statements whether to execute or not. if Statement : Simple if statement is the basic of decision-making statements in Java. It decides if certain amount of code should be executed based on the condition. Syntax: if (condition) {          Statemen 1; //if condition becomes true then this will be executed } Statement 2; //this will be executed irrespective of condition becomes true or false example : class IfStatement {     public static void main(String[] args) {     int number = 10;     if (number > 0) {     System.out.println("Number is positive.");     }     System.out.println("This statement is always executed.");     } } if…else Statement : In if…else statement, if condition is true then statements in if block will be executed but if it comes out as false then

Spring

Image
Spring Framework : Spring is a lightweight framework.  Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications.  Spring handles the infrastructure so you can focus on your application. it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF, etc.  The framework, can be defined as a structure where we find solution of the various technical problems. Spring enables you to build applications from “plain old Java objects” (POJOs) and to apply enterprise services non-invasively to POJOs.  This capability applies to the Java SE programming model and to full and partial Java EE. Modules : The Spring Framework consists of features organized into about 20 modules.  These modules are grouped into Core Container, Data Access/Integration, Web,  AOP (Aspect Oriented Programming), Instrumentation, and Test, as shown in the following diagram. 1.1 Core Contain

Java Basics

Java Basics :- --------------- Java variables Data types Variables:- Variables are containers for storing data values. In Java, there are different types of variables, for example: String - stores text, such as "Hello". String values are surrounded by double quotes int - stores integers (whole numbers), without decimals, such as 123 or -123 float - stores floating point numbers, with decimals, such as 19.99 or -19.99 char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes boolean - stores values with two states: true or false Declaring Variables :- Syntax : type variable = value; Data Types : - it specify Type of data Primitive Data Types : A primitive data type specifies the size and type of variable values, and it has no additional methods. There are eight primitive data types in Java: Data Type Size         Description byte               1 byte Stores whole numbers from -128 to 1