Java - Day1
Java - Day1
Java - Day1
PROGRAMMING
by
S.PARAMASIVAM
JAVA PROGRAMMING
Day 1:
•Getting Started with Java,
• Syntax,
•Comments,
•variables and Data types
JAVA PROGRAMMING
INTRODUCTION TO JAVA PROGRAMMING
Two types
C:\>javac FirstProgram.java
C:\>java Firstprogram
WELCOME TO JAVA PROGRAMMING
JAVA PROGRAMMING
Syntax
•Java Four Basic Syntax
classname objectname;
objectname=new classname();
JAVA PROGRAMMING
Syntax
•Java Basic Syntax
•Method: The behaviour of an object is the method. ...
Boolean Type
boolean
JAVA PROGRAMMING
JAVA PROGRAMMING
Java Data Types
Non Primitive Data Types
Strings
Arrays
User Defined Classes / Interfaces
JAVA PROGRAMMING
Java Data Types
Data Type Size Description
byte 1 byte Stores whole numbers from -128 to 127
float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits
double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits
Questions ?