انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم البرامجيات
المرحلة 2
أستاذ المادة احمد مهدي محمد سعيد الصالح
31/01/2016 20:09:31
All data are accessed by means of variables or attributes. Local variables such as those declared within methods, reside on the runtime stack; space is allocated for them when the method is called and deallocated when a method returns.
Every variable has to be declared and indicates its type. Primitive types? int, boolean, char. Eg? Other object types? defined by others. Eg: String and array contains references to objects Primitive types
Discuss example… int i = 6; ? Other object types(including arrays, String) Contain references to objects Created by the use of new operator E.g.: int [ ] a = new int [3]; array type contain three integer elements Space for a new array of int object will be allocated on the heap and a reference to the object will be stored in a [i.e. in a stack memory]. Local Variables : Must be initialized when they are declared. Such as : int =6; Declaration: indicating type of a variable. A Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println method, for example, the system actually executes several statements in order to display a message on the console. Now you will learn how to create your own methods with or without return values, invoke a method with or without parameters, overload methods using the same names, and apply method abstraction in the program design.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|