0% found this document useful (0 votes)
3 views2 pages

Java 2

Uploaded by

trishamhatre14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Java 2

Uploaded by

trishamhatre14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA /BLUE J

Java is develeoped by James Gosling in 1995. Earlier name was oak. Java is
widely used programming language. It is an OOP(object oriented programming)
language.

TYPES OF PROGRAM :
1. Standalone( Java application)
2. Internet applets(Java applets)

FEATURES OF JAVA
1. Object oriented language(OOP) language.
2. simple.
3. Platform independent.

BLUE J
1. Is a free Java environment(user interface) developed by monash
university, australia.
2. It is an editor which allows to write, edit and run Java program.

Variables & Constants/Literals


Identifier/Variables
It is a location in the computer’s memory. Name given to class or variables etc.
defined by the programmer.
Literals/Constants
Are fixed(constant) values which don’t change during program execution. Literals
are assigned to the variables.
Types : integer, real, character, String and boolean.

Rules for naming identifier/variables


A. Should start with an alphabet, dollar($) or _(underscore) sign.
B. Can’t contain special word except dollar($) and _(underscore) sign.
C. Can contain digits but cannot start with the digit.
D. No blank spaces
E. No reserve words are allowed
Data types
byte
Short
int
long
float
double
char
boolean
String

Identify following constants , variables or invalid


100 -c
“100” - c
100.50 - c
N- V
A- V
“N” - C
A10 - V
10A - INVALID
A10A - V
AREEB NASIR - INVALID
“AWAIS NASIR” - C
‘1’ - C
‘C’ - C
‘N1’ - INVALID
class - INVALID

You might also like