Day 2 B2 Session 1

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

CORE JAVA(Programming concepts) -

day2

part I

Introduction to java

data types

variable

operators

conditional and control statement

arrays

method

------------------------------------------------------------------

operators

Arithmetic operators

+,-,*,/ , %

relational operators

>=,<=.==,!=

a = 10;
b = 20;

if(a!=b)
syso()
else
syso()

logical operators

&&

||

assignment

. operator

new operator

ternery

bitwise

increment and decrement operator


how to read data from console

Scanner
{
public int nextInt()- to read integer data
{

nextFloat()- to read float


{}
next()- to read string of one word
{}
nextLine()- read more than one word in a single line(project engineer)
{}

Scanner s = new Scanner(System.in)

statement

method
- static method
- non static method

conditional and control statement

if

if
else

if
else if

while

do while

for - array

switch

You might also like