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
Summary

Summary Arithmetic Operators in JAVA Part 2

Rating
-
Sold
-
Pages
9
Uploaded on
07-07-2024
Written in
2023/2024

Explanation of what arithmetic operators are. Importance of arithmetic operations in programming for performing calculations.

Institution
Core Java

Content preview

Arithmetic Operators in Java

• + : Addition

• - : Subtraction

• * : Multiplication

• / : Division

• % : Modulus

• ++ : Increment

• -- : Decrement


Relational Operators in Java

• == : Equal to

• != : Not equal to

• > : Greater than

• < : Less than

• >= : Greater than or equal to

• <= : Less than or equal to


Variables and Data Types in Java

• int : Integer

• float : Floating point number

• double : Floating point number

• char : Character

, • boolean : True or false


Boolean Expressions and Logic Operations in Java

• && : Logical AND

• || : Logical OR

• ! : Logical NOT


Decision-making with if, else statements in Java

• if : Used for true condition

• else : Used for false condition

• else if : Used for multiple conditions




Variables and Data Types in Java
In Java, there are different data types available which can be categorized into:

1. Primitive data types

• Numeric types: int , float , double , long , short , byte

• Character type: char

• Boolean type: boolean

2. Non-primitive data types or Reference data types

• Classes
• Interfaces
• Arrays

Variables
Variables are used to store data. A variable must be declared before it can be used.
Declaring a variable includes specifying its type and name.

Document information

Uploaded on
July 7, 2024
Number of pages
9
Written in
2023/2024
Type
SUMMARY
£3.89
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
yasirusachintha

Get to know the seller

Seller avatar
yasirusachintha university of kelaniya
View profile
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
10
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions