1.How Java Works?

Screenshot (5).png

any program which is written in the java lanaguage after compling it, than it creates a filename.class by compiler that is the byte code that will fed into the jvm to run. here JRE provides the library to accomplish the tasks.

2.Variable :

variable is a something that allows user to store the data.

syntax for variable:

data_type var_name=val;

here data_type specifies the type of data storing, var_name specifies the name of variable to access the stored in it, = assignent operator and val is the value you need to store it in the variable.

**3.data types**

Java_datatype.jpg

Type conversion and casting.

Screenshot (7).png

type converion means implisitly which convers the type of the value into the different assigned datatype. note it can not converts the alue implicitly from int to char or char to int.

to do that we have costing as shown in above figure.

type conversion example

Screenshot (8).png

post and pre increments:

int num=7;

int res=++num // here which increments the number and than it stored into the res. known as pre increment.

int res=num++ //here the before incrementing the number num value will be fecthed int res.

Relational Operators

< , > , ++, - -,==(comparing two values), ! = , < = , > = , =(Assignment op)

these operators will return boolean value either true or false.

logical Operators

Screenshot (9).png