Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

If you are not understanding java concept,then you can easily fetch the notes and develop your coding language.

Rating
-
Sold
-
Pages
202
Uploaded on
12-03-2023
Written in
2022/2023

Java is specified language based on OOP's concept. Java is most powerful language which is utilised for each and every software based on java.

Institution
Course

Content preview

JAVA




JAVA

History
➢ James gosling is the father of java, and introduced in the year 1991.
➢ The software was named as green talk and the team which developed is
called green team. Later the software was renamed as Oak. Oak is a symbol
of strength and it is a national tree for Germany.
➢ There was already existing company called Oak technology which had
become a legal issues due to this legal issues they changed the software
name Oak to java.
➢ James gosling and his team went for a coffee to an island and the coffee
shop named was java hence they kept the software name as java , since they
went for a coffee they kept the coffee bug as a logo for the java software.
➢ Java is a high-level programming language originally developed by Sun
Microsystems and released in 1995. Java runs on a variety of platforms, such
as Windows, Mac OS, and the various versions of UNIX

Tokens
Token is the smallest unit of program.
In token we have,
1. Identifier 2. Keywords 3. Literals
4. Operators 5. Separators 6. Comments

1. Identifier
Identifier is a name given for the java program.

2. Keywords
Keywords are the pre – defined word which has its own meaning.
In java , we have 50 keywords as follows,


Page 1

,JAVA



Abstract continue for new switch
Assert default goto package synchronized
Boolean do implements private this
Break double import protected throw
Byte else instanceof public throws
Case enum int return transient
Catch extends interface short try
Char final long static void
Class finally native strictfp volatile
Const float new super while

3. Literals
Literals are the value which is used in java programming languages.
In literals we have,
1. Number literals: Integer literals → (9,8,7,6,5)
Decimal literals → (0.55, 0.75)

2. Character literals : enclosed in single quotes (‘ ‘) → (‘A’, ‘5’,’$’ ,’ ‘)

3. String literals : enclosed in double quotes (“ ”) → (“ Hello”, “$#*&”)

4. Boolean literals : TRUE, FALSE

4. Operators
Operator is a symbol which is used to perform some operations on the
operands.


Ex: 5 + 3 → operands
Operator



Page 2

,JAVA



Operator type Category Precedence
UNARY Postfix Expr++ , Expr--, ++Expr ,
Prefix -- Expr , +Expr , -Expr=!
ARITHMETIC Additive, */ % , + , -
multiplicative
SHIFT Shift << , >> , >>>
RELATIONAL Comparison < >, <=, >=, instance of
Equality ==, !=
BITWISE Bitwise AND , &
Bitwise exclusive OR, ^
Bitwise inclusive OR |
LOGICAL Logical AND &&
Logical OR ||
TERNARY Ternary ? :
ASSIGNMENT Assignment += , -= , *= , /= , %= , &= , ^ = ,
<<= , >>= , >>>=

5. Separators
Separators is used to separate the given code.
In java we have,
{ } → braces, [ ] → brackets, ( ) → parenthesis, ; → semicolon , ( , ) → comma

6. Comments
Comments are used to provide the additional information for the java
program.
In comments we have,
1. Single line comments
//……………..//
2. block line comments
/*………….*/


Page 3

, JAVA



Java architecture




➢ We will write the program in edit plus / notepad. It is also called as source
code which is in human readable format.
➢ To convert this human readable format into machine readable format, we
have to go to command prompt and perform 2 operations
1. Javac ( java compiler)
2. Java ( java interpreter)
➢ Once after writing the program we have to save the file with the extension of
.java in below path
c:/pgmfiles/java/ Jdk 1.8 / bin
➢ Once after saving we have to give this .java file as an input to the compiler
where it will check for 1). Syntax 2). Rules 3). Translate from .java to
.class file
➢ If there is any syntax or rules violation we get compile time error.
➢ If there is no violation then the .class file will be generated.
➢ .class is an intermediate code which is in byte code format which cannot
understood neither by human nor by machine.
➢ .class file will be given as input for the interpreter which 1). Reads line by
line 2). Execute ( JVM ) 3). Translate .class file to binary language.
➢ If we find any abnormal statements like 1/0 which is infinite , which is not
defined in java hence we get run time error called Arithmetic exception.


Page 4

Written for

Course

Document information

Uploaded on
March 12, 2023
Number of pages
202
Written in
2022/2023
Type
Class notes
Professor(s)
Software developer
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
prinsonjoseph55

Also available in package deal

Get to know the seller

Seller avatar
prinsonjoseph55 Jspiders
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions