1 CoreJava
1 CoreJava
What Is Java?
Java is a general-purpose Object-Oriented Programming Language.
What is a language?
A language is a medium which is used to interact with others
What are the similarities we can found between a language and a programming language?
English C or C++ or Java
In English we are having 26 characters 1. In C or C++ we have 256 characters
2. In Java we have 65534 only
We can form words by using We can form words(tokens) in programming
alphabets(characters) language.
Ex: going, cricket, watch, play, to, am, we, I,
movie. Ex: int, char, double, if, = , +,
100,10.50,’A’,”madhu”,a,b,c,eno,sal,ename etc..
Types of tokens
1. Keywords
2. Identifier
3. Operators
4. Literals or constants or values
5. Separators
6. Special symbols
7. Comments
We can form sentences by using words We can form statements by using tokens
Ex: I am going to play cricket Ex: int a=100; //variable declaration
Ex: I am going to watch movie Ex: double sal=200000.00;
We can write a paragraph by using sentences We can write a program by using statements.
We can write essays, articles, stories, lesions etc.. We can develop software by using programs
by u sing paragraphs.
Every character is assigned with a number, that number is called as ASCII value
Ex: a -> 97
Ex: A -> 65
Ex: 0 -> 48
A -> 65
a -> 97
అ -> 3077
अ -> 2309
Etc..
What is a statement?
1. A statement is an instruction or command given to a computer.
2. We can for a statement by using tokens.
Int keyword
a identifier
= operator
100 literal
; separator (special symbol)
// comments
What is a program?
Set of statements
What is a software?
Collection of programs.