SlideShare une entreprise Scribd logo
1  sur  29
Java Review
What is Java ?
• Java
  - Java is not just a programming language but it is a complete
  platform for object oriented programming.
• JRE
  - Java standard class libraries which provide Application
    Programming Interface and JVM together form JRE (Java Runtime
    Environment).
• JDK
  - JDK (Java development kit) provides all the needed support for
  software development in Java.
Java Virtual Machine (JVM)
• Runs the Byte Code.
• Makes Java platform independent.
• Handles Memory Management.
Byte Code
• Java bytecode is the form of instructions that
  the Java Virtual Machine executes
• A Java programmer does not need to be aware of or
  understand Java bytecode at all.
• The model of computation of Java bytecode is that
  of a stack oriented programming language.
Garbage Collection
• The programmer is not responsible for memory
  management in Java.
• The memory area in JVM where objects are created
  is called Heap.
• The memory is freed during runtime by a special
  thread called Garbage Collector.
• The GC looks for objects which are no longer
  needed by the program and destroys them.
Garbage Collection
Garbage Collection
Garbage Collection
Garbage Collection
How Java works ?

• Java compilers convert your code from human readable to
  something called “bytecode” in the Java world.

• “Bytecode” is interpreted by a JVM, which operates much
  like a physical CPU to actually execute the compiled code.

• Just-in-time (JIT) compiler is a program that turns
  Java bytecode into instructions that can be sent directly to
  the processor.
How Java works ?
Basic Java Syntax
Data Types in Java
• Data types define the nature of a value
• We need different data-types to handle real-world information
   Name      Size (in bits)                          Range

    long          64          -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

     int          32                      –2,147,483,648 to 2,147,483,647
    Short         16                           –32,768 to 32,767
    byte           8                               –128 to 127
   double         64                         4.9e–324 to 1.8e+308

    float         32                         1.4e–045 to 3.4e+038
    char          16                              0 to 65,536
   boolean        ??
                                                   true/false
Primitive Types and Variables

 • boolean, char, byte, short, int, long, float, double etc.
 • These basic (or primitive) types are the only types that are
   not objects (due to performance issues).
 • This means that you don’t use the new operator to create
   a primitive variable.
Naming Convention of Variables
• Can start with a letter, an underscore(_), or a dollar sign ($)
• Cannot start with a number.

 long _LongNumber = 9999999;
 String firstName = “John”;
 float $Val = 2.3f;
 int i, index = 2;
 double gamma = 1.2;
 boolean value2 = false;
Statements & Blocks

• A simple statement is a command terminated by a semi-colon:
  name = “Fred”;
• A block is a compound statement enclosed in curly brackets:
  {
       name1 = “Fred”; name2 = “Bill”;
  }
• Blocks may contain other blocks.
Flow of Control


• Java executes one statement after the other in the
  order they are written.

• Many Java statements are flow control statements:
  Alternation:
      if, if else, switch
Java Basic Constructs


•   If
•   If…else
•   Nested If…else
•   Switch Statement
If else– Syntax


if ( <condition> )
{
         // Execute these statements if <condition> is TRUE
}
If else– Syntax

if ( <condition> )
{
         // Execute these statements if <condition> is TRUE
}
else
{
         // Execute these statements if < condition> is FALSE
}
If else– Syntax

if ( <condition1> )
{
           // Execute these statements if <condition1> is TRUE
} else if ( <condition2> )
{
           // Execute these statements if <condition2> is TRUE
} else {
           // if both <condition1> and <condition2> is FALSE
}
switch– Syntax

switch (expression)
{
case cond1:
          block_1;
          break;

case cond2:
          block_2;
          break;
...
default:
          block_default;
}
Operators
• Provide a way to perform different operations on
  variables


• Categories of Java Operators
  Assignment Operators   =
  Arithmetic Operators   -    +    *    /    %
  Relational Operators   >    <    >=   <=   ==   !=
  Logical Operators      &&   ||   &    |    ^
  Unary Operators        +    -    ++   --   !
Assignment and Arithmetic Operators
• Used to assign a value to a variable
• Syntax
   – <variable> = <expression>
   Assignment Operator                                 =

• Java provides eight Arithmetic operators:
   – for addition, subtraction, multiplication, division, modulo (or
     remainder), increment (or add 1), decrement (or subtract 1),
     and negation.
Relational Operators
• Used to compare two values.
• Binary operators, and their operands are numeric
  expressions.
  Relational Operators   >   <   >=   <=   ==   !=
Logical Operators
• Return a true or false value based on the state of
  the variables
• There are six logical operators
                     Conditional AND   Conditional OR   AND   OR   NOT   Exclusive OR


 Logical Operators        &&                ||          &     |     !         ^
Static versus Non-static Variables
• Static variables are shared across all the objects of a
  class
  – There is only one copy
• Non-Static variables are not shared
  – There is a separate copy for each individual live object.
• Static variables cannot be declared within a
  method.
•Q& A..?
Thanks..!

Contenu connexe

Tendances

Tutorial visitor
Tutorial visitorTutorial visitor
Tutorial visitor
Wei Wang
 

Tendances (16)

Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
 
SQL Interview Questions For Experienced
SQL Interview Questions For ExperiencedSQL Interview Questions For Experienced
SQL Interview Questions For Experienced
 
Java Variable Types
Java Variable TypesJava Variable Types
Java Variable Types
 
6. static keyword
6. static keyword6. static keyword
6. static keyword
 
Java essentials for hadoop
Java essentials for hadoopJava essentials for hadoop
Java essentials for hadoop
 
Preparing Java 7 Certifications
Preparing Java 7 CertificationsPreparing Java 7 Certifications
Preparing Java 7 Certifications
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Advanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesAdvanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID Principles
 
L2 datatypes and variables
L2 datatypes and variablesL2 datatypes and variables
L2 datatypes and variables
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
Data members and member functions
Data members and member functionsData members and member functions
Data members and member functions
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
Vhdl identifiers,data types
Vhdl identifiers,data typesVhdl identifiers,data types
Vhdl identifiers,data types
 
Tutorial visitor
Tutorial visitorTutorial visitor
Tutorial visitor
 

En vedette (8)

Java class 8
Java class 8Java class 8
Java class 8
 
Java class 7
Java class 7Java class 7
Java class 7
 
Java class 4
Java class 4Java class 4
Java class 4
 
Java
Java Java
Java
 
Java class 5
Java class 5Java class 5
Java class 5
 
Java class 6
Java class 6Java class 6
Java class 6
 
Java class 3
Java class 3Java class 3
Java class 3
 
What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...
What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...
What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...
 

Similaire à Java class 1

JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
Virat Andodariya
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
prat0ham
 

Similaire à Java class 1 (20)

java in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariyajava in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariya
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Learn To Code: Introduction to java
Learn To Code: Introduction to javaLearn To Code: Introduction to java
Learn To Code: Introduction to java
 
Learning core java
Learning core javaLearning core java
Learning core java
 
Lecture2_Datatypes_Variables.ppt
Lecture2_Datatypes_Variables.pptLecture2_Datatypes_Variables.ppt
Lecture2_Datatypes_Variables.ppt
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
Unit 1
Unit 1Unit 1
Unit 1
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
 
ppt_on_java.pptx
ppt_on_java.pptxppt_on_java.pptx
ppt_on_java.pptx
 
Java basic
Java basicJava basic
Java basic
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
Scala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud Foundry
 
Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with Epsilon
 
Week2 dq4
Week2 dq4Week2 dq4
Week2 dq4
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Java Tutorial | My Heart
Java Tutorial | My HeartJava Tutorial | My Heart
Java Tutorial | My Heart
 
Synapseindia reviews.odp.
Synapseindia reviews.odp.Synapseindia reviews.odp.
Synapseindia reviews.odp.
 

Plus de Edureka!

Plus de Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Java class 1

  • 2. What is Java ? • Java - Java is not just a programming language but it is a complete platform for object oriented programming. • JRE - Java standard class libraries which provide Application Programming Interface and JVM together form JRE (Java Runtime Environment). • JDK - JDK (Java development kit) provides all the needed support for software development in Java.
  • 3. Java Virtual Machine (JVM) • Runs the Byte Code. • Makes Java platform independent. • Handles Memory Management.
  • 4. Byte Code • Java bytecode is the form of instructions that the Java Virtual Machine executes • A Java programmer does not need to be aware of or understand Java bytecode at all. • The model of computation of Java bytecode is that of a stack oriented programming language.
  • 5. Garbage Collection • The programmer is not responsible for memory management in Java. • The memory area in JVM where objects are created is called Heap. • The memory is freed during runtime by a special thread called Garbage Collector. • The GC looks for objects which are no longer needed by the program and destroys them.
  • 10. How Java works ? • Java compilers convert your code from human readable to something called “bytecode” in the Java world. • “Bytecode” is interpreted by a JVM, which operates much like a physical CPU to actually execute the compiled code. • Just-in-time (JIT) compiler is a program that turns Java bytecode into instructions that can be sent directly to the processor.
  • 13. Data Types in Java • Data types define the nature of a value • We need different data-types to handle real-world information Name Size (in bits) Range long 64 -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 int 32 –2,147,483,648 to 2,147,483,647 Short 16 –32,768 to 32,767 byte 8 –128 to 127 double 64 4.9e–324 to 1.8e+308 float 32 1.4e–045 to 3.4e+038 char 16 0 to 65,536 boolean ?? true/false
  • 14. Primitive Types and Variables • boolean, char, byte, short, int, long, float, double etc. • These basic (or primitive) types are the only types that are not objects (due to performance issues). • This means that you don’t use the new operator to create a primitive variable.
  • 15. Naming Convention of Variables • Can start with a letter, an underscore(_), or a dollar sign ($) • Cannot start with a number.  long _LongNumber = 9999999;  String firstName = “John”;  float $Val = 2.3f;  int i, index = 2;  double gamma = 1.2;  boolean value2 = false;
  • 16. Statements & Blocks • A simple statement is a command terminated by a semi-colon: name = “Fred”; • A block is a compound statement enclosed in curly brackets: { name1 = “Fred”; name2 = “Bill”; } • Blocks may contain other blocks.
  • 17. Flow of Control • Java executes one statement after the other in the order they are written. • Many Java statements are flow control statements: Alternation: if, if else, switch
  • 18. Java Basic Constructs • If • If…else • Nested If…else • Switch Statement
  • 19. If else– Syntax if ( <condition> ) { // Execute these statements if <condition> is TRUE }
  • 20. If else– Syntax if ( <condition> ) { // Execute these statements if <condition> is TRUE } else { // Execute these statements if < condition> is FALSE }
  • 21. If else– Syntax if ( <condition1> ) { // Execute these statements if <condition1> is TRUE } else if ( <condition2> ) { // Execute these statements if <condition2> is TRUE } else { // if both <condition1> and <condition2> is FALSE }
  • 22. switch– Syntax switch (expression) { case cond1: block_1; break; case cond2: block_2; break; ... default: block_default; }
  • 23. Operators • Provide a way to perform different operations on variables • Categories of Java Operators Assignment Operators = Arithmetic Operators - + * / % Relational Operators > < >= <= == != Logical Operators && || & | ^ Unary Operators + - ++ -- !
  • 24. Assignment and Arithmetic Operators • Used to assign a value to a variable • Syntax – <variable> = <expression> Assignment Operator = • Java provides eight Arithmetic operators: – for addition, subtraction, multiplication, division, modulo (or remainder), increment (or add 1), decrement (or subtract 1), and negation.
  • 25. Relational Operators • Used to compare two values. • Binary operators, and their operands are numeric expressions. Relational Operators > < >= <= == !=
  • 26. Logical Operators • Return a true or false value based on the state of the variables • There are six logical operators Conditional AND Conditional OR AND OR NOT Exclusive OR Logical Operators && || & | ! ^
  • 27. Static versus Non-static Variables • Static variables are shared across all the objects of a class – There is only one copy • Non-Static variables are not shared – There is a separate copy for each individual live object. • Static variables cannot be declared within a method.

Notes de l'éditeur

  1. Not just a programming language but a complete platformThe Programming language Java standard class libraries which provide Application Programming Interface and JVM together form JRE (Java Runtime Environment)JDK (Java development kit) provides all the needed support for software development in Java.
  2. Need a diagram to show garbage collection
  3. Need a diagram to show garbage collection
  4. Java compilers convert your code from human readable Java source files to something called “bytecode” in the Java world. “Bytecode” is interpreted by a JVM, which operates much like a physical CPU might operate on machine code, to actually execute the compiled code. Performance - Java performance in generally second only to C/C++ in common language performance comparisons. In the Java programming language and environment, a just-in-time (JIT) compiler is a program that turns Java bytecode (a program that contains instructions that must be interpreted) into instructions that can be sent directly to the processor.The just-in-time compiler comes with the virtual machine and is used optionally. It compiles the bytecode into platform-specific executable code that is immediately executed
  5. Java compilers convert your code from human readable Java source files to something called “bytecode” in the Java world. “Bytecode” is interpreted by a JVM, which operates much like a physical CPU might operate on machine code, to actually execute the compiled code. Performance - Java performance in generally second only to C/C++ in common language performance comparisons. In the Java programming language and environment, a just-in-time (JIT) compiler is a program that turns Java bytecode (a program that contains instructions that must be interpreted) into instructions that can be sent directly to the processor.The just-in-time compiler comes with the virtual machine and is used optionally. It compiles the bytecode into platform-specific executable code that is immediately executed
  6. Adv. Question : What is the range of primitive data types ?Initalization:If no value is assigned prior to use, then the compiler will give an errorJava sets primitive variables to zero or false in the case of a boolean variableAll object references are initially set to null
  7. Java provides six relational operators:greater than (&gt;), less than (&lt;), greater than or equal (&gt;=), less than or equal (&lt;=), equal (==), and not equal (!=).
  8. Is it really needed to define all the types of operators.It will be better to show their differences through a program.
  9. DemoBroke into multiple sentences