Classes and Objects


Published on

Java Classes and Objects

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Classes and Objects

  1. 1. Introduction To Java Programming
  2. 2. What is OOP? <ul><li>Object-oriented programming technology can be summarized by three key concepts: </li></ul><ul><li>– Objects that provide encapsulation of procedures and data </li></ul><ul><li>– Messages that support polymorphism across objects </li></ul><ul><li>– Classes that implement inheritance within class hierarchies </li></ul>
  3. 3. The Three OOP Principles <ul><li>Encapsulation </li></ul><ul><li>The mechanism that binds together code and the data it manipulates, and both safe from outside interference and misuse </li></ul><ul><li>Inheritance </li></ul><ul><li>The process by which one object acquires the properties of another object </li></ul><ul><li>Polymorphism </li></ul><ul><ul><li>A feature that allows one interface to be used for a general class of actions. </li></ul></ul>
  4. 4. History of Java <ul><li>During 1990, James Gosling, Bill Joy and others at Sun Microsystems began developing a language called Oak. </li></ul><ul><li>They primarily intended it as a language for microprocessors embedded in consumer devices. </li></ul><ul><li>To serve these goals, Oak needed the following features: </li></ul><ul><li>_ platform independence, since it must run on devices from multiple manufacturers </li></ul><ul><li>_ extreme reliability (can’t expect consumers to reboot their VCRs!) </li></ul><ul><li>_ compactness, since embedded processors typically have limited memory </li></ul>
  5. 5. History of Java (continued..) <ul><li>Sun Microsystems shifted the target market to internet applications and changed the name of the project to Java . </li></ul><ul><li>The portability of Java made it ideal for the Web, and in 1995 Sun’s HotJava browser appeared. </li></ul><ul><li>It illustrated the power of applets – programs that run within a browser – and the ability of Java to accelerate program development. </li></ul>
  6. 6. History of Java (continued..) <ul><li>Java is used extensively in business to develop enterprise, or middleware, applications such as on-line stores, transactions processing, dynamic web page generation, and database interactions . </li></ul><ul><li>Java has also returned to its Oak roots and become very common on small platforms such as smart cards, cell phones, and PDAs. </li></ul><ul><li>For example, as of mid-2004 there are over 350 different Java-enabled mobile phone handsets available across the world, and over 600 million Java Cards have been distributed. </li></ul>
  7. 7. Comparing C++ and Java <ul><li>Some of the important features that distinguish Java from C++. </li></ul><ul><li>Everything must be in a class. There are no global functions or global data. If you want the equivalent of globals, make static methods and static data within a class. </li></ul><ul><li>There are no structs or enumerations or unions, only classes. </li></ul><ul><li>All method definitions are defined in the body of the class </li></ul><ul><li>Class definitions are roughly the same form in Java as in C++, but there’s no closing semicolon </li></ul>
  8. 8. Comparing C++ and Java (continued..) <ul><li>In addition, package names are established using the dot, and to perform a kind of C++ #include you use the import keyword. </li></ul><ul><li>There are no Java pointers in the sense of C and C++ </li></ul><ul><li>There are no destructors in Java. The lifetime of an object is determined instead by the garbage collector </li></ul><ul><li>There is a finalize( ) method that’s a member of each class, something like a C++ destructor, but finalize( ) is called by the garbage collector and is supposed to be responsible only for releasing &quot;resources&quot; (such as open files, sockets, ports, URLs, etc) </li></ul>
  9. 9. What is Java? <ul><li>Java is a high-level, third generation programming language, like C, Fortran, Smalltalk, Perl, and many others. </li></ul><ul><li>We can use Java to write computer applications that crunch numbers, process words, play games, store data or do any of the thousands of other things computer software can do. </li></ul>
  10. 10. Java isn't C! <ul><li>In C, almost everything is in functions </li></ul><ul><li>In Java, almost everything is in classes </li></ul><ul><li>There is often only one class per file </li></ul><ul><li>There must be only one public class per file </li></ul><ul><li>The file name must be the same as the name of that public class, but with a .java extension </li></ul>
  11. 11. Java Virtual Machine <ul><li>Java is compiled into bytecodes </li></ul><ul><li>Bytecodes are high-level, machine-independent instructions for a hypothetical machine, the Java Virtual Machine (JVM) </li></ul><ul><li>The Java run-time system provides the JVM </li></ul>
  12. 12. Java Virtual Machine (contonued..) <ul><li>The JVM interprets the bytecodes during program execution </li></ul><ul><li>Since the bytecodes are interpreted, the performance of Java programs slower than comparable C/C++ programs </li></ul><ul><li>But the JVM is continually being improved and new techniques are achieving speeds comparable to native C++ code </li></ul>
  13. 13. Java Virtual Machine (contonued..) <ul><li>All Java programs run on top of the JVM </li></ul><ul><li>The JVM was first implemented inside Web browsers, but is now available on a wide variety of platforms </li></ul><ul><li>The JVM interprets the bytecodes defined in a machine-independent binary file format called a class file </li></ul>
  14. 14. Compiling and Executing A Java Program <ul><li>On command line </li></ul><ul><ul><li>javac </li></ul></ul><ul><li>On command line </li></ul><ul><ul><li>java classname </li></ul></ul>
  15. 15. Java Features <ul><li>Automatic garbage collection </li></ul><ul><li>No manual memory allocation and deallocation </li></ul><ul><ul><li>Never have to worry about memory leaks </li></ul></ul><ul><li>No pointers or pointer arithmetic </li></ul><ul><li>Arrays are first-class objects </li></ul><ul><li>Array bounds are always checked </li></ul><ul><li>Multiple inheritance replaced by interfaces </li></ul><ul><li>Eliminates complexities of multiple inheritance </li></ul>
  16. 16. Types Of Java Programs <ul><li>Application </li></ul><ul><li>Standalone Java program that can run independent of any Web browser </li></ul><ul><li>Applet </li></ul><ul><li>Java program that runs within a Java-enabled Web browser </li></ul><ul><li>Servlet </li></ul><ul><li>Java software that is loaded into a Web server to provide additional server functionality ala CGI programs </li></ul>
  17. 17. Automatic garbage collection <ul><li>In some languages the programmer allocates memory for the creation of objects stored on the heap and the responsibility of later deallocating that memory thus resides on the programmer </li></ul><ul><li>If the programmer forgets to deallocate memory or writes code that fails to do so, a memory leak occurs and the program can consume an arbitrarily large amount of memory </li></ul>
  18. 18. Automatic garbage collection (continued..) <ul><li>In Java, this potential problem is avoided by automatic garbage collection </li></ul><ul><li>The programmer determines when objects are created, and the Java runtime is responsible for managing the object's lifecycle </li></ul><ul><li>The program or other objects can reference an object by holding a reference to it </li></ul><ul><li>When no references to an object remain, the Java garbage collector automatically deletes the unreachable object , freeing memory and preventing a memory leak </li></ul>
  19. 19. Java as a General Application Language <ul><li>Java is a powerful, general-purpose programming language that just happens to be safe and architecture independent </li></ul><ul><li>Standalone Java applications are not subject to the restrictions; they can do all activities that software written in a language like C does </li></ul><ul><li>Any software that implements the Java run-time system can run Java applications. </li></ul><ul><li>Applications written in Java can be large or small, standalone or component-like, as in other languages </li></ul>
  20. 20. Anatomy of a Java Program <ul><li>Comments </li></ul><ul><li>Package </li></ul><ul><li>Reserved words </li></ul><ul><li>Modifiers </li></ul><ul><li>Statements </li></ul><ul><li>Blocks </li></ul><ul><li>Classes </li></ul><ul><li>Methods </li></ul><ul><li>The main method </li></ul>
  21. 21. Java Comments <ul><li>Java supports three styles of comments: </li></ul><ul><li>A standard C-style comment, where all of the characters between </li></ul><ul><li>/* and */ are ignored. </li></ul><ul><li>A single-line comment, where all of the characters from </li></ul><ul><ul><li>// to the end of the line are ignored. </li></ul></ul><ul><li>A documentation comment that begins with </li></ul><ul><ul><li>/** and ends with */. </li></ul></ul>
  22. 22. Packages <ul><li>Java classes can be grouped together into a package </li></ul><ul><li>Packages have several advantages: </li></ul><ul><li>related classes can be grouped together </li></ul><ul><li>class names and member names need not be unique across the entire program </li></ul><ul><li>members can be accessible only to methods of classes in the same package </li></ul><ul><li>The package statement must appear as the first statement of the Java source file: </li></ul><ul><li>package Myproject.Mymodule.Myclasses; </li></ul><ul><li>If no package statement is present, the code is made part of the unnamed default package </li></ul>
  23. 23. Packages (continued..) <ul><li>A fully qualified Java name for a class is: </li></ul><ul><li><Package Name>.<Class Name> </li></ul><ul><li>For example, Myproject.Mymodule.Myclasses.Myclass </li></ul><ul><li>Class files must be stored in a directory that has the same components of the package name for the class </li></ul><ul><li>For example, the class Myproject.Mymodule.Myclasses.Myclass must be in the Myproject / Mymodule / Myclasses / Myclass . class file </li></ul><ul><li>This filename is interpreted relative to one of the directories specified in the CLASSPATH environment variable </li></ul>
  24. 24. The Import Statement <ul><li>The import statement allows the use of abbreviated class names in a Java source file </li></ul><ul><li>Classes are always available via their fully-qualified names: </li></ul><ul><li>Myproject.Mymodule.Myclasses.Myclass mc = new Myproject.Mymodule.Myclasses.Myclass (); </li></ul><ul><li>The import statement does not &quot;read in&quot; the class or &quot;include&quot; it; it just saves typing : </li></ul><ul><li>import Myproject.Mymodule.Myclasses.Myclass ; </li></ul><ul><li>Myclass mc = new Myclass (); </li></ul>
  25. 25. The Import Statement (continued..) <ul><li>All of the classes of a package can be imported at one time using this form of the import statement: </li></ul><ul><li>import java.util.*; </li></ul><ul><li>This imports all of the classes in the java.util package. </li></ul>
  26. 26. Reserved Words <ul><li>Reserved words or keywords are words that have a specific meaning to the compiler and cannot be used for other purposes in the program. </li></ul><ul><li>For example, when the compiler sees the word class , it understands that the word after class is the name for the class. Other reserved words are public , static , and void . </li></ul>
  27. 27. Reserved Words.. <ul><li>abstract default goto null synchronized </li></ul><ul><li>boolean do if package this </li></ul><ul><li>break double implements private throw </li></ul><ul><li>byte else import protected throws </li></ul><ul><li>case extends instanceof public transient </li></ul><ul><li>catch false int return true </li></ul><ul><li>char final interface short try </li></ul><ul><li>class finally long static void </li></ul><ul><li>const float native super volatile </li></ul><ul><li>continue for new switch while </li></ul>
  28. 28. Statements <ul><li>A statement represents an action or a sequence of actions. </li></ul><ul><li>The statement System.out.println(&quot;Welcome to Java!&quot;) is used to display the greeting &quot;Welcome to Java!&quot; </li></ul><ul><li>Every statement in Java ends with a semicolon (;). </li></ul>
  29. 29. Blocks <ul><li>A pair of braces in a program forms a block that groups components of a program. </li></ul>
  30. 30. Classes <ul><li>The class is the essential Java construct. </li></ul><ul><li>A class is a template or blueprint for objects. </li></ul><ul><li>To program in Java, you must understand classes and be able to write and use them. </li></ul><ul><li>For now, though, understand that a program is defined by using one or more classes. </li></ul>
  31. 31. What is a class? <ul><li>Early languages had only arrays </li></ul><ul><ul><li>all elements had to be of the same type </li></ul></ul><ul><li>Then languages introduced structures (called records , or structs ) </li></ul><ul><ul><li>allowed different data types to be grouped </li></ul></ul><ul><li>Then Abstract Data Types (ADTs) became popular </li></ul><ul><ul><li>- grouped operations along with the data </li></ul></ul>
  32. 32. So, what is a class? <ul><li>A class consists of </li></ul><ul><ul><li>- a collection of fields , or variables , very much like the named fields of a struct </li></ul></ul><ul><ul><li>- all the operations (called methods ) that can be performed on those fields </li></ul></ul><ul><ul><li>- can be instantiated </li></ul></ul><ul><li>A class describes objects and operations defined on those objects </li></ul>
  33. 33. The class hierarchy <ul><li>Classes are arranged in a hierarchy </li></ul><ul><li>The root, or topmost, class is Object </li></ul><ul><li>Every class but Object has at least one superclass </li></ul><ul><li>A class may have subclasses </li></ul><ul><li>Each class inherits all the fields and methods of its (possibly numerous) superclasses </li></ul>
  34. 34. UML Representation of A Class Class name Field values Class name Method signatures : name, argument types, result type Field signatures : type and name
  35. 35. An example of a class <ul><li>class Person { String name; int age; </li></ul><ul><li> void birthday ( ) { age++; System.out.println (name + ' is now ' + age); } } </li></ul><ul><li>class Driver extends Person { long driversLicenseNumber; Date expirationDate; } </li></ul>Variable Method
  36. 36. Creating and using an object <ul><li>Person john; john = new Person ( ); = &quot;John Smith&quot;; john.age = 37; </li></ul><ul><li>Person mary = new Person ( ); = &quot;Mary Brown&quot;; mary.age = 33; mary.birthday ( ); </li></ul>
  37. 37. Scope of Objects <ul><li>Java objects don’t have the same lifetimes as primitives. </li></ul><ul><li>When you create a Java object using new , it hangs around past the end of the scope. </li></ul><ul><li>Here, the scope of name s is delimited by the {}s but the String object hangs around until GC’d </li></ul><ul><ul><li>{ </li></ul></ul><ul><ul><li>String s = new String(&quot;a string&quot;); </li></ul></ul><ul><ul><li>} /* end of scope */ </li></ul></ul>
  38. 38. Methods <ul><li>Method is : for eg System.out.println(“ Welcome to Java!&quot; ): </li></ul><ul><li>A collection of statements that performs a sequence of operations to display a message on the console. </li></ul><ul><li>It can be used even without fully understanding the details of how it works. </li></ul><ul><li>It is used by invoking a statement with a string argument. </li></ul><ul><li>The string argument is enclosed within parentheses. In this case, the argument is &quot;Welcome to Java!&quot; You can call the same println method with a different argument to print a different message. </li></ul>
  39. 39. main Method <ul><li>The main method provides the control of program flow. The Java interpreter executes the application by invoking the main method. </li></ul><ul><li>  </li></ul><ul><li>The main method looks like this: </li></ul><ul><li>  </li></ul><ul><li>public static void main(String[] args) { </li></ul><ul><li>// Statements; </li></ul><ul><li>} </li></ul>
  40. 40. Static Members <ul><li>In some cases, certain members should only belong to the class, and not be part of any object created from the class. </li></ul><ul><li>An example of such a situation is when a class wants to keep track of how many objects of the class have been created. </li></ul><ul><li>Defining a counter as an instance variable in the class definition for tracking the number of objects created, does not solve the problem. </li></ul><ul><li>Each object created will have its own counter field. Which counter should then be updated? </li></ul>
  41. 41. Static Members <ul><li>The solution is to declare the counter field as being static. Such a field is called a static variable. </li></ul><ul><li>It belongs to the class, and not to any object of the class. A static variable is initialized when the class is loaded at runtime. </li></ul>
  42. 42. Static Members <ul><li>Similarly, a class can have static methods that belong only to the class, and not to any objects of the class. </li></ul><ul><li>Static variables and static methods are collectively known as static members, and are distinguished from instance members in a class definition by the keyword static in their declaration. </li></ul>
  43. 43. Some Java OO Terminology <ul><li>Class - collection of data (attributes) and methods that operate on that data </li></ul><ul><li>Member - either an attribute or a method of a class </li></ul><ul><li>Public Member - member which is accessible by any method in any class </li></ul><ul><li>Private Member - member which is accessible only by methods defined within the class </li></ul><ul><li>Public Class - class that is visible everywhere and can be used by any method in any class </li></ul><ul><li>Object - instance of a class </li></ul><ul><li>Object Instantiation - the creation of a new object </li></ul>
  44. 44. Some Java OO Terminology (Continued..) <ul><li>Constructor - method which performs object initialization ( not creation!) </li></ul><ul><li>Object Reference - variable that holds a reference to (really the memory address of) an object </li></ul><ul><li>Instance Variable - attribute for which each object (instance) has its own copy </li></ul><ul><li>Class Variable - attribute for which there is only one copy for the class. Each object (instance) shares this copy. Also called a static variable </li></ul>
  45. 45. Some Java OO Terminology (Continued..) <ul><li>Instance Method - method which operates on the attributes of an object (instance) </li></ul><ul><li>Class Method - method which does not operate on a particular object, but performs some utility function or operates on static variables. Also called a static method . </li></ul><ul><li>Method Signature - the number, type and order of arguments of a method </li></ul><ul><li>Method Overloading - defining a method with the same name but different signature as another method in the same class </li></ul>
  46. 46. Visibility Modifiers <ul><li>We've already seen that a class member can be modified with the </li></ul><ul><li>public, private or protected keywords </li></ul><ul><li>If none of these modifiers are used, the member has the default visibility or &quot;package&quot; visibility </li></ul><ul><li>A package member is only accessible from within the class that defines it or a class in the same package </li></ul>
  47. 47. Visibility Modifiers (continued..) <ul><li>The definitive chart! </li></ul>No No No Yes Non-subclass in different package No No Yes Yes Subclass in different package No Yes Yes Yes Class in same package Yes Yes Yes Yes Same class private package protected public MEMBER VISIBILITY ACCESSIBLE TO
  48. 49. Data Types <ul><li>Primitive Types </li></ul><ul><li>Type Representation Range </li></ul><ul><li>byte 8-bit, signed -128 to 127 </li></ul><ul><li>short 16-bit, signed -32768 to 32767 </li></ul><ul><li>int 32-bit, signed -2147483648 to 2147483647 </li></ul><ul><li>long 64-bit, signed -9223372036854775808 to 9223372036854775807 </li></ul><ul><li>char 16-bit, unsigned, Unicode </li></ul><ul><li>float 32-bit 1.40239846e-45 to 3.40282347e+38 </li></ul><ul><li>double 64-bit 4.94065645841246544e-324 to 1.79769313486231570e+308 </li></ul><ul><li>boolean </li></ul>
  49. 50. Java Operators <ul><li>Precedence Operator Description </li></ul><ul><li>1 ++, -- Increment and decrement </li></ul><ul><li>1 +, - Unary plus and minus </li></ul><ul><li>1 ~ Bitwise complement </li></ul><ul><li>1 ! Boolean </li></ul><ul><li>2 *, /, % Multiplication, division, remainder </li></ul><ul><li>3 +, - Addition and subtraction </li></ul><ul><li>3 + String </li></ul><ul><li>4 << Left shift </li></ul><ul><li>4 >> Right shift with sign extension </li></ul><ul><li>4 >>> Right shift with no extension </li></ul>
  50. 51. Java Operators (continued..) <ul><li>Precedence Operator Description </li></ul><ul><li>5 <, <=, >, >= Numeric comparison </li></ul><ul><li>5 instanceof Type comparison </li></ul><ul><li>6 ==, != Equality and inequality of value </li></ul><ul><li>6 ==, != Equality and inequality of reference </li></ul><ul><li>7 & Bitwise AND </li></ul><ul><li>8 ^ Bitwise XOR </li></ul><ul><li>9 | Bitwise OR </li></ul><ul><li>10 && Conditional AND </li></ul><ul><li>11 || Conditional OR </li></ul><ul><li>12 ?: Conditional ternary operator </li></ul><ul><li>13 = *=, /=, %=, +=, -=, <<=, >>=, >>>=, &=, ^=, |= Assignment </li></ul>
  51. 52. Java Literals <ul><li>Integer literals </li></ul><ul><li>Integer literals can be specified in octal (base 8), decimal (base10), or hexadecimal (base 16). </li></ul><ul><li>int i = 1230; </li></ul><ul><li>int i = 01230; // i = 664 decimal </li></ul><ul><li>int i = 0xFFFF; </li></ul><ul><li>Floating-point literals </li></ul><ul><li>Floating-point literals are of type double unless they are suffixed with an f denoting that they are to be produced as a float value: </li></ul><ul><li>double d = 8.31; </li></ul><ul><li>double e = 3.00e+8; </li></ul><ul><li>float f = 8.31F; float g = 3.00e+8F; </li></ul>
  52. 53. Java Literals (continued..) <ul><li>Character literals </li></ul><ul><li>A literal character value can be specified either as a single-quoted character or as an escaped ASCII or Unicode sequence: </li></ul><ul><li>char a = 'a'; </li></ul><ul><li>char newline = ' '; </li></ul><ul><li>char ch = 88 ; //code for X </li></ul><ul><li>Boolean Literals </li></ul><ul><li>It can have only one of two possible values, true or false </li></ul><ul><li>boolean b = false; </li></ul>
  53. 54. Wrapper Classes for Primitive Types <ul><li>Sometimes we need to process primitive-type data as objects </li></ul><ul><li>Java provides a set of classes called wrapper classes whose objects contain primitive-type values: </li></ul><ul><li>Float , Double , Integer , Boolean , Character , etc. </li></ul>
  54. 55. Naming conventions <ul><li>Java is case-sensitive; maxval, maxVal, and MaxVal are three different names </li></ul><ul><li>Class names begin with a capital letter </li></ul><ul><li>All other names begin with a lowercase letter </li></ul><ul><li>Subsequent words are capitalized: theBigOne </li></ul><ul><li>Underscores are not used in names </li></ul><ul><li>These are very strong conventions! </li></ul>
  55. 56. Type Conversion and Casting <ul><li>When one type of data is assigned to another type of variable, an automatic type conversion will take place if </li></ul><ul><ul><ul><li>The two types are compatible </li></ul></ul></ul><ul><ul><ul><li>The destination type is larger than the source type. </li></ul></ul></ul><ul><ul><ul><li>Casting Incompatible Types </li></ul></ul></ul><ul><ul><ul><li>To create a conversion between two incompatible types, you must use a cast. </li></ul></ul></ul><ul><ul><li>(target-type) value; </li></ul></ul>
  56. 57. Type Conversion and Casting (Continued..) <ul><li>Casting </li></ul><ul><li>int a; </li></ul><ul><li>a = 10; </li></ul><ul><li>byte b; </li></ul><ul><li>b = (byte) a; </li></ul><ul><li>byte b; </li></ul><ul><ul><li>int i = 257; </li></ul></ul><ul><ul><li>b = (byte) i; // 1 </li></ul></ul><ul><li>double d = 223.22; </li></ul><ul><li>int i = (int) d; // 223 </li></ul>
  57. 58. Automatic Type Promotion in Expressions <ul><li>Java automatically promotes each byte type or short operand to int when evaluating an expression. </li></ul><ul><li>byte b= 50; </li></ul><ul><li>b = b * 2; // Error. Cannot assign an int to a byte </li></ul><ul><li>b = (byte) (b*2); // valid </li></ul>
  58. 59. Array Creation and Initialization <ul><li>As in C, array indices start with zero </li></ul><ul><li>After creation, the array elements are initialized to the default values for their type. </li></ul><ul><li>For numeric types, this means the elements are initially zero: </li></ul><ul><li>int [] grades = new int [30]; </li></ul><ul><li>grades[0] = 99; </li></ul><ul><li>grades[1] = 72; </li></ul><ul><li>Java supports the C-style curly braces {} construct for creating an array and initializing its elements when it is declared: </li></ul><ul><li>int [] primes = { 1, 2, 3, 5, 7, 7+4 }; </li></ul><ul><li>An array object of the proper type and length is implicitly created. </li></ul>
  59. 60. An array is an object <ul><li>Person mary = new Person ( ); </li></ul><ul><li>int myArray[ ] = new int[5]; </li></ul><ul><ul><li>or </li></ul></ul><ul><li>int myArray[ ] = {1, 4, 9, 16, 25}; </li></ul><ul><li>String languages [ ] = {&quot;Prolog&quot;, &quot;Java&quot;}; </li></ul><ul><li>Since arrays are objects they are allocated dynamically </li></ul><ul><li>Arrays, like all objects, are subject to garbage collection when no more references remain </li></ul><ul><ul><li>- so fewer memory leaks </li></ul></ul><ul><ul><li>- Java doesn’t have pointers! </li></ul></ul>
  60. 61. Array (continued..) <ul><li>The elements are indexes and are referenced using the form arrayvar[subscript] </li></ul>
  61. 62. Java Control Statements <ul><li>A group of statements executed in order is written </li></ul><ul><ul><li>{ stmt1; stmt2; ...; stmtN; } </li></ul></ul><ul><li>The statements execute in the order 1, 2, ..., N </li></ul><ul><li>Control statements alter this sequential flow of execution </li></ul>
  62. 63. Java Control Statements (continued..)
  63. 64. Java Control Statements (continued..)
  64. 65. THANK YOU