Java Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Automation Testing

Automation Testing is the process of testing the software using an automation tool to
find the defect. In this process executing the script and generating the reports
automatically.

Required one programming language.


Example - C , C++, C#, Java, .net. Ruby , R, Python.
Most of the company are using JAVA with selenium so we going to learn in our class
Java.

Required one editor tool to write the java code - Eclipse editor tool.

Automation tool - Selenium web driver

Java -
Java is a classed based object oriented programming language. For building the web
based and desktop based application.

Features of java
1. Simple
2. Object oriented programming lan.
3. Platform independent. - Windows ,Linux , MacOs.
4. Secured.
5. Robust - ( Strong)
6. Freely available in the market.

Project structure :

Project creation Steps in eclipse


Java Project —> (Demo)
Multiple Packages —> (Test1,Test2, Test3)
1 Package —> Multiple Classes —> (Sample1, Sample 2)
1 Class —> Multiple Methods —> Main method
1 Main method —> Multiple printing statement

The main() method is the starting pint for JVM to start execution of the java program.
Without main method JVM will not execute the program.

Syntax - public static void main(String [] args){


// Code/ Program
}
The curly braces {} marks the beginning and ending of the block of the code.
Code statement must end with a semicolon(;).
System.out.println(“Automation"); // Printing statement
First Section syllabus

1. Variables (introduction)
2. Data Type
3. Methods
4. Loops
5. Control statements
6. Keywords & identifiers
7. Types of variables
8. Constructor

1. Variables :-

1. Variables are nothing but piece of memory use to store information &
One variable can store 1 information at a time.
2. Variables also used in information reusability.
3.To utalize variables in java programming language we need to follow below steps:
1.Variable declaration (Allocating/Reserving memory)
2.Variable Initialisation (Assigning or inserting value)
3.Usage

2. Data Types

1. Data type are used to represent data or information which we are going to store in
variables.
0r
Data types specify the different sizes and values that can be stored in the variable.

2. In java programming it is mandatory to declared data type before declaration of


variables;

There are two types of data Types


1. Primitive data type

There are 8 primitive data type in java


1. Byte - 1 Byte — 8 Bit. — 128 to 127
2. Short - 2 Byte — 16 Bit — 32768 to 32767
3. Int - 4 Byte —- 32 Bit —- 2147483648 to 2147483647
4. Long - 8 Byte —-> 64 Bit —> 9223372036854775807
5. Boolean. —-> 1 Bit
6. Char. —> 2 Byte - 16 Bit
7. Float. —>. 4 Byte - 32 Bit
8. Double —>. 8 Byte - 64 Bit

2. Non Primitive data type


Example —> String , Array, Classes

Memory size of non primitive is not fixed /defined

You might also like