Презентация 4. Java OOP. 6. Inner Classes онлайн

На нашем сайте вы можете скачать и просмотреть онлайн доклад-презентацию на тему 4. Java OOP. 6. Inner Classes абсолютно бесплатно. Урок-презентация на эту тему содержит всего 14 слайдов. Все материалы созданы в программе PowerPoint и имеют формат ppt или же pptx. Материалы и темы для презентаций взяты из открытых источников и загружены их авторами, за качество и достоверность информации в них администрация сайта не отвечает, все права принадлежат их создателям. Если вы нашли то, что искали, отблагодарите авторов - поделитесь ссылкой в социальных сетях, а наш сайт добавьте в закладки.



Оцените!
Оцените презентацию от 1 до 5 баллов!
  • Тип файла:
    ppt / pptx (powerpoint)
  • Всего слайдов:
    14 слайдов
  • Для класса:
    1,2,3,4,5,6,7,8,9,10,11
  • Размер файла:
    96.50 kB
  • Просмотров:
    58
  • Скачиваний:
    0
  • Автор:
    неизвестен



Слайды и текст к этой презентации:

№1 слайд
. Java OOP . Inner Classes
Содержание слайда: 4. Java OOP 6. Inner Classes

№2 слайд
Nested Classes of A nested
Содержание слайда: Nested Classes (1 of 2) A nested class is a class defined within another class: class OuterClass { ... class NestedClass { ... } }

№3 слайд
Nested Classes of A nested
Содержание слайда: Nested Classes (2 of 2) A nested class is a member of its enclosing class Non-static nested classes (inner classes) have access to other members of the enclosing class, even if they are declared private Static nested classes do not have access to other instance members of the enclosing class

№4 слайд
Why Use Nested Classes? It is
Содержание слайда: Why Use Nested Classes? It is a way of logically grouping classes that are only used in one place. It increases encapsulation. Nested classes can lead to more readable and maintainable code (places the code closer to where it is used)

№5 слайд
Static Nested Classes of A
Содержание слайда: Static Nested Classes (1 of 2) A static nested class is associated with its outer class Like static class methods, a static nested class cannot refer directly to instance variables or methods defined in its enclosing class - it can use them only through an object reference

№6 слайд
Static Nested Classes of
Содержание слайда: Static Nested Classes (2 of 2) Static nested classes are accessed using the enclosing class name: OuterClass.StaticNestedClass To create an object for the static nested class, use this syntax: OuterClass.StaticNestedClass nestedObject = new OuterClass.StaticNestedClass();

№7 слайд
Inner Classes of An inner
Содержание слайда: Inner Classes (1 of 2) An inner class has direct access to that object's methods and fields It cannot define any static members itself Objects that are instances of an inner class exist within an instance of the outer class

№8 слайд
Inner Classes of To
Содержание слайда: Inner Classes (2 of 2) To instantiate an inner class, you must first instantiate the outer class. Then, create the inner object within the outer object with this syntax: outerClass.InnerClass innerObject = outerObject.new InnerClass();

№9 слайд
Local Inner Classes Inner
Содержание слайда: Local Inner Classes Inner classes can be created inside code blocks, typically inside the body of a method A local inner class cannot have an access specifier It does have access to the final variables in the current code block and all the members of the enclosing class

№10 слайд
Anonymous Classes Anonymous
Содержание слайда: Anonymous Classes Anonymous classes combine the process of definition and instantiation into a single step As these classes do not have a name, an instance of the class can only be created together with the definition

№11 слайд
Anonymous Class Example I new
Содержание слайда: Anonymous Class Example I new Thread(new Runnable() { public void run() { ... } }).start();

№12 слайд
Anonymous Class Example II
Содержание слайда: Anonymous Class Example II JFrame frame = new JFrame("AnonimDemo2"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } });

№13 слайд
Anonymous Classes Use For
Содержание слайда: Anonymous Classes Use For creating objects on the fly in contexts such as: the value in a return statement an argument in a method call in initialization of variables to implement event listeners in GUI-based applications

№14 слайд
Manuals http docs.oracle.com
Содержание слайда: Manuals http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html

Скачать все slide презентации 4. Java OOP. 6. Inner Classes одним архивом: