JAVA
Designed by - james gosling
released - 1995
A java is a programming language . it is one of the most popular programming language in the world . created by james gosling at sun Microsystems. First it was named Oak then Green and finally java. currently the ownership of the programming language is with Oracle.
uses of java ?
create Desktop applications .
create mobile application .
create web application .
create games.
used in web and application servers.
why learn java ?
It is a fast and powerFull language . It works on many platforms like window , mac , Linux etc. Easy to learn and use .open source and free. Learning other languages will be way more easier after learning java and its OOP concept.
java first program
*Every java program is written inside a class.
*Commands start to execute from the main method in the class.
1. save the file using the same name used for the class name with extension .java.
2. Compile (This will create the java byte code file with . class extension .
3. Run the program.
using Println() Vs Print()
Println() - Adds a line break after the output.
Data types
Data are needed to be stored within a program during execution . The type of data needed to be stored should be specified before storing them .
All data type in java divided in two parts-
1) PRIMITIVE DATA TYPES
2) NON- PRIMITIVE DATA TYPES
Primitive Non-Primitive
byte-1 class
short-2 object
int-4 array
float-4 interface
double-8 string
character-2
boolean-1 true/false
💯
ReplyDelete