0% found this document useful (0 votes)
0 views2 pages

Java Notes

The document is a course outline for a Java programming class taught by Dr. Wendy Writer. It covers logical conditions and conditional statements in Java, including the use of 'if', 'else', 'else if', and 'switch'. The document provides examples of how these statements can be utilized to execute different blocks of code based on specified conditions.

Uploaded by

yallsuckbruh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

Java Notes

The document is a course outline for a Java programming class taught by Dr. Wendy Writer. It covers logical conditions and conditional statements in Java, including the use of 'if', 'else', 'else if', and 'switch'. The document provides examples of how these statements can be utilized to execute different blocks of code based on specified conditions.

Uploaded by

yallsuckbruh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C‭ OURSE NAME‬

‭FALL SEMESTER 20XX‬


I‭NSTRUCTOR: DR. WENDY WRITER‬
[email protected]

‭04 September 20XX‬

‭Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod‬
‭tincidunt ut laoreet dolore magna aliquam erat volutpat.‬

‭ava‬
‭Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper s‬

‭Conditions and If Statements‬


‭You already know that Java supports the usual logical conditions from‬
‭mathematics:‬

‭●‬ ‭Less than:‬‭


a < b‬
‭●‬ ‭Less than or equal to:‬‭
a <= b‬
‭●‬ ‭Greater than:‬‭
a > b‬
‭●‬ ‭Greater than or equal to:‬‭
a >= b‬
‭●‬ ‭Equal to‬‭
a == b‬
‭●‬ ‭Not Equal to:‬‭
a != b‬

‭You can use these conditions to perform different actions for different decisions.‬

‭Java has the following conditional statements:‬

‭1‬
‭●‬ ‭Use‬‭
if‬‭to specify a block of code to be executed, if a specified condition is‬
‭true‬
‭●‬ ‭Use‬‭
else‬‭to specify a block of code to be executed,‬‭if the same condition‬
‭is false‬
‭●‬ ‭Use‬‭
else if‬‭to specify a new condition to test, if‬‭the first condition is‬
‭false‬
‭●‬ ‭Use‬‭
switch‬‭to specify many alternative blocks of code‬‭to be executed‬

‭The if Statement‬
‭Use the‬‭
if‬‭statement to specify‬

‭uscipit lobortis nisl ut aliquip ex ea commodo consequat.‬

‭●‬ ‭At vero eos et accusam et justo duo dolores et ea rebum‬


‭○‬ ‭Ut wisi enim ad minim veniam.‬
‭○‬ ‭Quis nostrud exerci tation ullamcorper.‬
‭○‬ ‭Suscipit lobortis nisl ut aliquip ex ea commodo consequat.‬

‭Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel‬
‭illum dolore eu feugiat nulla facilisis at vero eros et accumsan.‬

‭Lorem ipsum dolor‬

‭●‬ ‭At vero eos et accusam et justo duo dolores et ea rebum‬


‭○‬ ‭Ut wisi enim ad minim veniam.‬
‭○‬ ‭Quis nostrud exerci tation ullamcorper.‬

‭2‬

You might also like