File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
SourceCode/chap_04-Operations/Lesson_01 Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11/*****************************************************************************
22 * PROJECT: Java-101 Comprehensive Programming Course
33 * MODULE: Introduction to Java Fundamentals
4- * LESSON: 2 .1 - Arithmetic Operators
4+ * LESSON: 4 .1 - Arithmetic Operators
55 *
66 * AUTHOR: Dr. Saad Laouadi, Ph.D.
77 * CREATED: March 2025
8+ * Updated: April 2025
89 *
910 * Copyright © 2025 Dr. Saad Laouadi. All Rights Reserved.
1011 * See LICENSE file for complete terms.
@@ -16,6 +17,7 @@ public static void main(String[] args) {
1617 int a = 10 ;
1718 int b = 3 ;
1819
20+ displayBanner ('*' , 62 );
1921 System .out .println ("ARITHMETIC OPERATORS DEMONSTRATION" );
2022 System .out .println ("==================================" );
2123 System .out .println ("Working with variables: a = " + a + ", b = " + b );
@@ -90,5 +92,12 @@ public static void main(String[] args) {
9092 System .out .println ("\n Operator Precedence:" );
9193 System .out .println (" 10 + 20 / 5 = " + (10 + 20 / 5 ) + " (division happens before addition)" );
9294 System .out .println (" (10 + 20) / 5 = " + ((10 + 20 ) / 5 ) + " (parentheses override default precedence)" );
95+ displayBanner ('*' , 62 );
96+ }
97+ static void displayBanner (char c , int length ){
98+ for (int i =0 ; i < length ; i ++){
99+ System .out .print (c );
100+ }
101+ System .out .println ();
93102 }
94103}
You can’t perform that action at this time.
0 commit comments