Classes Java – Regras Importantes Java Classes – Important Rules Modificadores Permitidos/Allowed Modifiers: [accordion] [spoiler open=”true” title=”De Visibilidade”] public default [/spoiler] [spoiler title=”Funcionais”] abstract: Pode ter métodos abstratos e concretos./ Can have abstract and concrete methods. final: Não pode ser extendida./ Cannot be extended. Nota: abstract e final juntos não combinam./ abstract and final do not fit together. [/spoiler] [spoiler title=”Pouco usuais”] strictfp: os pontos flutuantes contidos na classe, deverão ter o mesmo comportamento independente da implementação da JVM./ the floats contained in the class should have the same behavior regardless of the JVM implementation. [/spoiler] [/accordion] Construtores/ Constructors: Toda classe tem um construtor default implícito, se for se sobrecarregado deixa de existir e precisa ser escrito./ Every class has an default implicit constructor, if it is overloaded it ceases to exist and needs to be explicitly written. Cuidado: Ao herdar uma classe que nao tem um contrutor default, deve-se respeitar a assinatura do construtor sobrecarregado./Be careful: When inheriting a class that does not have a default constructor, you should respect the signature of the overloaded constructor. Construtores não são herdados./ Constructors are not inherited. Toda sub-classe faz uma chamada implicita para super(), na primeira linha do construtor. Cuidado: se não houver um construtor padrão, deve-se fazer o construtor da sub-classe chamar o construtor sobrecarregado da classe pai. / Be careful: If there isn’t no default constructor, you should make the sub-class constructor call the overloaded constructor of the parent class....