100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
If you are not understanding java concept,then you can easily fetch the notes and develop your coding language. $7.99   Add to cart

Class notes

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

 1 view  0 purchase
  • Course
  • Institution

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.

Preview 4 out of 202  pages

  • March 12, 2023
  • 202
  • 2022/2023
  • Class notes
  • Software developer
  • All classes
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller prinsonjoseph55. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75323 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart