Java
Introduction to java.
Introduction to Java.
1. Java is a class based object oriented programming language.
2. Java was designed by james gosling.
3. It was released in the year 1995.
4. Current version of java Java SE15.0.2
Why Java ?
1. Java is used for Enterprise application development.
2. Android development.
3. Desktop application development.
4. Games development.
Features of Java
1. Simple and easy to learn
2. Object oriented
3. Robust - automatic garbage collection and simple memory management
4. High performance
5. Supports multithreading
6. Platform independent
Introduction to Eclipse IDE
How code gets compiled in java.
Java is platform independent
Data types in java
Data types Default value Default size
byte 0 1
short 0 2
int 0 4
long oL 8
float 0.0f 4
double 0.0d 8
char ‘/v0000’ 2
boolean false 1 bit
Operators in java
Java supports following types of operators.
1. Arithmetic operators
2. Comparison operators
3. Logical operators
4. Assignment operators
5. Conditional or Ternary operators
Control statements
Control statements are used to control flow of execution.
1. If statement
2. Switch statement
Looping statements:
a) For
b) While
c) Do while
Arrays
Array is a group of like type varibles that are referred by common name.
Syntax to declare Array in java :
1. dataType[] arr; (or)
2. dataType arr[];
Initilization of Array in java:
1. Int arr[] = new int[5];
Functions
It is a block of code defined to perform operation or task.
Function has 2 parts
1. Function declaration
2. Function definition or body
Syntax:
Access specifier return type function name {
}
example:
public void myFunction() {
}

1_java_introduction.pdf

  • 1.
  • 2.
    Introduction to Java. 1.Java is a class based object oriented programming language. 2. Java was designed by james gosling. 3. It was released in the year 1995. 4. Current version of java Java SE15.0.2
  • 3.
  • 4.
    1. Java isused for Enterprise application development. 2. Android development. 3. Desktop application development. 4. Games development.
  • 5.
    Features of Java 1.Simple and easy to learn 2. Object oriented 3. Robust - automatic garbage collection and simple memory management 4. High performance 5. Supports multithreading 6. Platform independent
  • 6.
  • 7.
    How code getscompiled in java.
  • 8.
    Java is platformindependent
  • 9.
    Data types injava Data types Default value Default size byte 0 1 short 0 2 int 0 4 long oL 8 float 0.0f 4 double 0.0d 8 char ‘/v0000’ 2 boolean false 1 bit
  • 10.
    Operators in java Javasupports following types of operators. 1. Arithmetic operators 2. Comparison operators 3. Logical operators 4. Assignment operators 5. Conditional or Ternary operators
  • 11.
    Control statements Control statementsare used to control flow of execution. 1. If statement 2. Switch statement Looping statements: a) For b) While c) Do while
  • 12.
    Arrays Array is agroup of like type varibles that are referred by common name. Syntax to declare Array in java : 1. dataType[] arr; (or) 2. dataType arr[]; Initilization of Array in java: 1. Int arr[] = new int[5];
  • 13.
    Functions It is ablock of code defined to perform operation or task. Function has 2 parts 1. Function declaration 2. Function definition or body Syntax: Access specifier return type function name { } example: public void myFunction() { }