O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Interface

BLU BLU Alemão 4 flashcards

Flashcards do conjunto (4)

  1. 1What is an interface?- Blueprint of a class
    - Collection of Abstract Methods
    - Contract between the class and outside world
    - is a relationship
  2. 2Difference between Abstract Class and InterfaceAbstract:
    - Abstract and non abstract methods
    - Final, non-final, static, non-static variables
    - Members like private, protected
    - Extend class, implement multiple interfaces
    Interface:
    - Abstract methods
    - Static and final variables by default
    - public by default
    - Only another Interface can extend an interface
  3. 3Static Methods in Interface- The keyword is "static"
    - Can have any number of static methods
    - Can't override the static method
    - Can't define method of java.lang.Object as static methods
    - For common behavior static methods are used
    - Using interface name static methods are called
    - From Java 9 onwards in Interfaces we can create private methods and private static methods (to have higher code reusability)
  4. 4Comparison Java 7, Java 8 and Java 9Java 7:
    - Constant variables
    - Abstract methods
    Java 8:
    - Constant variables
    - Abstract methods
    - Default methods
    - Static methods
    Java 9:
    Constant variables
    - Abstract Methods
    - Default Methods
    - Static Methods
    - Private Methods
    - Private Static Methods

Informações

Descrição
FlashCards sobre Interface, criado por BLU BLU em 27-01-2025.
Criado por
BLU BLU
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?