Operators In Java Part - 8
Like My Page:
www.facebook.com/pakcoders
What is Java? Part - 1
https://www.slideshare.net/MuhammadAtif231/what-is-java-part-1
History Of Java Part - 2
https://www.slideshare.net/MuhammadAtif231/history-of-java-part-2
Features Of Java Part - 3
https://www.slideshare.net/MuhammadAtif231/history-of-java-part-2
C++ Vs Java Part - 4
https://www.slideshare.net/MuhammadAtif231/c-vs-java-part-4
Previously we had begin with Java Tutorial beginners guide featuring – What is Java , features of Java Programming Language , Java editors and different Java editions and Java Application Types . Now on Java tutorial we begin with the section 2 that is about JVM – Java Virtual Machine . And also about the difference between JDK Vs JRE Vs JVM including other aspects of Java Virtual Machine .
https://maccablo.com/java-virtual-machine-jdk-jre-jvm/
Previously we had begin with Java Tutorial beginners guide featuring – What is Java , features of Java Programming Language , Java editors and different Java editions and Java Application Types . Now on Java tutorial we begin with the section 2 that is about JVM – Java Virtual Machine . And also about the difference between JDK Vs JRE Vs JVM including other aspects of Java Virtual Machine .
https://maccablo.com/java-virtual-machine-jdk-jre-jvm/
itft-Decision making and branching in javaAtul Sehdev
Decision Making Statements,The if Statement, SIMPLE IF STATEMENT, The If…else Statement, Nesting of IF..Else Statements, THE else if ladder, The Switch Statement, rules apply to a switch statement
This is the presentation file about inheritance in java. You can learn details about inheritance and method overriding in inheritance in java. I think it's can help your. Thank you.
itft-Decision making and branching in javaAtul Sehdev
Decision Making Statements,The if Statement, SIMPLE IF STATEMENT, The If…else Statement, Nesting of IF..Else Statements, THE else if ladder, The Switch Statement, rules apply to a switch statement
This is the presentation file about inheritance in java. You can learn details about inheritance and method overriding in inheritance in java. I think it's can help your. Thank you.
Programming language model organized around objects rather than "actions" and data rather than “logic”. For a programming language to be a true OOP language, the language must meet the following criteria: abstraction, encapsulation, polymorphism, inheritance
In the concept of constructor and destructors can be easily understand to the concepts of c++ in the concepts contain type conversion and types of conversion are explained with examples
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Instructions for Submissions thorugh G- Classroom.pptx
Operators In Java Part - 8
1. Title : Java Programming Language
Muhammad Atif Noori
noorithemes@gmail.com
www.facebook.com/pakcoders
www.facebook.com/pakcoders
1
2. Java Basic Operators
Java provides a rich set of operators to manipulate variables. We can divide all the Java
operators into the following groups −
Arithmetic Operators
Relational Operators
Bitwise Operators
Logical Operators
Assignment Operators
Misc Operators
www.facebook.com/pakcoders
2
3. Java Arithmetic Operators
Arithmetic operators are used in mathematical expressions in the same way that they are used
in algebra. The following table lists the arithmetic operators.
www.facebook.com/pakcoders
3
Operator Description Example
+ (Addition)
Adds values on either side of the
operator.
A + B will give 30
- (Subtraction)
Subtracts right-hand operand from
left-hand operand. A - B will give -10
* (Multiplication)
Multiplies values on either side of the
operator. A * B will give 200
4. Java Arithmetic Operators
www.facebook.com/pakcoders
4
/ (Division)
Divides left-hand operand by
right-hand operand.
B / A will give 2
% (Modulus)
Divides left-hand operand by
right-hand operand and
returns remainder.
B % A will give 0
++ (Increment)
Increases the value of operand
by 1.
B++ gives 21
-- (Decrement)
Decreases the value of
operand by 1.
B-- gives 19
5. Example
www.facebook.com/pakcoders
5
class Test{
Public static void main(String[] args) {
int a = 10;
int b = 20;
int c = 25;
int d = 25;
System.out.println("a + b = " + (a + b) );
System.out.println("a - b = " + (a - b) );
System.out.println("a * b = " + (a * b) );
Part 1 of 3
6. Example
www.facebook.com/pakcoders
6
System.out.println("b / a = " + (b / a) );
System.out.println("b % a = " + (b % a) );
System.out.println("c % a = " + (c % a) );
System.out.println("a++ = " + (a++) );
System.out.println("b-- = " + (a--) );
// Check the difference in d++ and ++d
System.out.println("d++ = " + (d++) );
System.out.println("++d = " + (++d) );
}
}
Part 2 of 3
8. Java Relational Operators
There are following relational operators supported by Java language.
www.facebook.com/pakcoders
8
Operator Description Example
== (equal to)
Checks if the values of two operands are
equal or not, if yes then condition becomes
true.
(A == B) is not true.
!= (not equal to)
Checks if the values of two operands are
equal or not, if values are not equal then
condition becomes true.
(A != B) is true.
> (greater than)
Checks if the value of left operand is greater
than the value of right operand, if yes then
condition becomes true.
(A > B) is not true.
9. Java Relational Operators
www.facebook.com/pakcoders
9
< (less than)
Checks if the value of left operand
is less than the value of right
operand, if yes then condition
becomes true.
(A < B) is true.
>= (greater than or equal to)
Checks if the value of left operand
is greater than or equal to the
value of right operand, if yes then
condition becomes true.
(A >= B) is not true.
<= (less than or equal to)
Checks if the value of left operand
is less than or equal to the value
of right operand, if yes then
condition becomes true.
(A <= B) is true.
10. Example
www.facebook.com/pakcoders
10
class Test{
Public static void main(String[] args) {
int a = 10;
int b = 20;
System.out.println("a == b = " + (a == b) );
System.out.println("a != b = " + (a != b) );
System.out.println("a > b = " + (a > b) );
System.out.println("a < b = " + (a < b) );
System.out.println("b >= a = " + (b >= a) );
Part 1 of 3
13. Java Logical Operators
The following table lists the logical operators
www.facebook.com/pakcoders
13
Operator Description Example
&& (logical and)
Called Logical AND operator. If both the
operands are non-zero, then the condition
becomes true.
(A && B) is false
|| (logical or)
Called Logical OR Operator. If any of the two
operands are non-zero, then the condition
becomes true.
(A || B) is true
! (logical not)
Called Logical NOT Operator. Use to reverses the
logical state of its operand. If a condition is true
then Logical NOT operator will make false.
!(A && B) is true
14. Java Assignment Operators
Following are the assignment operators supported by Java language
www.facebook.com/pakcoders
14
Operator Description Example
=
Simple assignment operator. Assigns values
from right side operands to left side operand.
C = A + B will assign
value of A + B into C
+=
Add AND assignment operator. It adds right
operand to the left operand and assign the
result to left operand.
C += A is equivalent to
C = C + A
-=
Subtract AND assignment operator. It
subtracts right operand from the left operand
and assign the result to left operand.
C -= A is equivalent to
C = C – A
15. Java Assignment Operators
www.facebook.com/pakcoders
15
*=
Multiply AND assignment
operator. It multiplies right
operand with the left operand
and assign the result to left
operand.
C *= A is equivalent to C = C *
A
/= Divide AND assignment
operator. It divides left
operand with the right
operand and assign the result
to left operand.
C /= A is equivalent to C = C / A
16. Java Assignment Operators
www.facebook.com/pakcoders
16
<<=
Left shift AND assignment
operator.
C <<= 2 is same as C = C << 2
>>=
Right shift AND assignment
operator.
C >>= 2 is same as C = C >> 2
&=
Bitwise AND assignment
operator.
C &= 2 is same as C = C & 2
^=
bitwise exclusive OR and
assignment operator.
C ^= 2 is same as C = C ^ 2
|=
bitwise inclusive OR and
assignment operator.
C |= 2 is same as C = C | 2
17. Java Miscellaneous Operators
There are few other operators supported by Java Language.
Conditional Operator ( ? : )
Conditional operator is also known as the ternary operator. This operator consists of three
operands and is used to evaluate Boolean expressions. The goal of the operator is to decide,
which value should be assigned to the variable. The operator is written as −
www.facebook.com/pakcoders
17
variable x = (expression) ? value if true : value if false
18. Example
www.facebook.com/pakcoders
18
class Test{
Public static void main(String[] args) {
int a = 10;
int b = (a == 1) ? 20 : 30;
System.out.println( "Value of b is : " + b );
b = (a == 10) ? 20 : 30;
System.out.println( "Value of b is : " + b );
Part 1 of 2