Posts

Decrement In JAVA

Image
DECREMENT IN JAVA  Hello Geeks!!! OVERVIEW  :- Decrement :  Decrement Is Change In Value Of The Variable. It Is The Substraction Of -1 to The Variable. Two Types Of  Decrement  :  Pre-Decrement                                               Post-Decrement  Pre-Decrement :  It Is The Change Of Value Before The Execution. SYNTAX- ++variable. Post- Decrement  :  It Is The Change Of Value After The Execution. SYNTAX- variable++ PROGRAM  :- //  Decrement  In Java public class  Decrement { public static void main (String args[ ]) { int a=5,b=10; a= --a ; //Pre- Decrement b= b-- ; //Post- Decrement System.out.println ("A = "+a); System.out.println ("B = "+b); }  }  OUTPUT  :- TEST YOURSELF :- QUES -- WRITE A JAV...

Increment In JAVA

Image
INCREMENT IN JAVA  Hello Geeks!!! OVERVIEW  :- Increment : Increment Is Change In Value Of The Variable. It Is The Addition Of +1 to The Variable. Two Types Of Increment : Pre-Increment                                               Post-Increment  Pre-Increment : It Is The Change Of Value Before The Execution. SYNTAX- ++variable. Post-Increment :  It Is The Change Of Value After The Execution. SYNTAX- variable++ PROGRAM :- // Increment In Java public class Increment { public static void main (String args[ ]) { int a=5,b=10; a=++a; //Pre-Increment b=b++; //Post-Increment System.out.println ("A = "+a); System.out.println ("B = "+b); }  }  OUTPUT  :- TEST YOURSELF :- QUES -- WRITE A JAVA PROGRAM TO STORE AND INCREMENT VARIABLE AND PRINT IT You can...

Operations In JAVA - Addition, Subtraction, Mutiplication, Division

Image
OPERATIONS IN JAVA - ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION   Hello Geeks!!! OVERVIEW  :- Operations Are Carried Through Diffrent Operators  Addition: + Operator Subtraction: -  Operator Multiplication: *  Operator Division: /  Operator PROGRAM :- //Operations In JAVA - Addition, Subtraction, Mutiplication, Division /* **1st-We Have To Declare CLASS **2nd-We Have To Declare MAIN Function **3rd-Carrying Out OPERATIONS **4th-PRINT Statement */ public class OperationsInJava //Class {//Opening Of Class     public static void main (String args[]) //Main Function {//Opening Of Main Function     int a=5,b=10; //Declaration Of Numbers     int sum,diff,prod,div; //Declaration For Storing Operations  sum = a + b; //Operations diff = a - b; //Operations prod = a * b; //Operations div = a / b; //Operations System.out.println("SUM = "+sum); // Print Statement...

Initialising A Variable In JAVA

Image
INITIALISING A VARIABLE IN JAVA Hello Geeks!!! INITIALISATION IS CARRIED ON CONSTANTS, VARIABLES AND DATA TYPES OVERVIEW :- CONSTANTS ➡ It Is a Number That Does'nt changes Its Value And Remains Same Throught The Program. VARIABLES  ➡ It Is Number Or Variables That Varies Throughout The Program. Its Value Can Be Assigned by Constants. DATA TYPES  ➡ It Is A Particular Kind Of Data Item, As Defined By The Values It Can Take.Diffrent Types Of Data Types In JAVA are :             Integer - int - int a = 22;            Float - float - float b = 3.14;            Double - double - double c = 5.454584654;            Character - char - char ch =  'a';            String - String - String str = "JAVA"; There are Many More Data Types But These are The Basic Data Types We Need To Know While We Are New At JAV...

Hello World - First JAVA Program

Image
FIRST JAVA PROGRAM - HELLO WORLD Hello Geeks!!! HELLO WORLD - IT IS THE FIRST PROGRAM THAT EVERY PROGRAMMER LEARNS WHILE LEARNING NEW PROGRAMMING LANGUAGE //First JAVA Program /* **1st-We Have To Declare CLASS  **2nd-We Have To Declare MAIN Function  **3rd-Print Statement  */ public class FirstJavaProgram  {     public static void main (String args[ ]) {      System.out.println("HELLO GEEKS!!!");      }      } NOTE :-  To RUN Your Code You Can Either Write Yourself  Or Copy The Above Code Into Any JAVA IDE's ( I ntegrated Development Environment ) Or Any Online Compiler OUTPUT : TEST YOURSELF : Ques--WRITE A JAVA PROGRAM TO PRINT YOUR NAME AND AGE . You can e-mail me your program for queries  - javalearners22@gmail.com Follow Us:- - https://www.instagram.com/javalearners7/