Table of Contents
Java Language Specification Java SE 17 Edition Chapter 8 - Classes
Return to Java 17 Language Spec Table of Contents, Java 17 Language Spec, Java Language Specifications, Language Specifications, Java bibliography, Java DevOps, Java, Java topics, Awesome Java, Java development tools
8. Classes
Java Language Specification Java SE 17 Edition Chapter 8 - Classes
- 8.1.1.3 strictfp Classes Page 241 - Java strictfp Class
- 8.1.2 Generic Classes and Type Parameters Page 241 - Generic Class and Type Parameter - Java Generic Class - Java Type Parameter
- 8.1.3 Inner Classes and Enclosing Instances Page 244 - Inner Class and Enclosing Instance - Java Inner Class and Java Enclosing Instance
- 8.1.4 Superclasses and Subclasses Page 248 - Superclass and Subclass - Java Superclass and Java Subclass
- 8.1.5 Superinterface Page 251 - Java Superinterface
- 8.1.6 Permitted Direct Subclasses Page 254 - Direct Subclass - Java Direct Subclass - Java Permitted Direct Subclass
- 8.1.7 Class Body and Member Declarations Page 256 - Class Member - Java Class Member - Java Class Body and Java Member Declaration
- 8.2 Class Member Page 257 - Java Class Member
vi The Java Language Specification
- 8.3.1 Field Modifiers Page 266 - Java Field Modifier
- 8.3.1.1 static Fields Page 266 - Java static Field
- 8.3.1.2 final Fields Page 269 - Java final Field
- 8.3.1.3 transient Fields Page 270 - Java transient Field
- 8.3.1.4 volatile Fields Page 270 - Java volatile Field
- 8.3.2 Field Initialization Page 271 - Java Field Initialization
- 8.4 Method Declaration Page 276 - Java Method Declaration
- 8.4.1 Formal Parameter Page 278 - Java Formal Parameter
- 8.4.2 Method Signature Page 280 - Java Method Signature
- 8.4.3 Method Modifier Page 282 - Java Method Modifier
- 8.4.3.1 abstract Method Page 282 - Java abstract Method
- 8.4.3.2 static Method Page 284 - Java static Method
- 8.4.3.3 final Method Page 284 - Java final Method
- 8.4.3.4 native Method Page 285 - Java native Method
- 8.4.4 Generic Method Page 287 - Java Generic Method
- 8.4.5 Method Result Page 288 - Java Method Result
- 8.4.6 Method Throws Page 289 - Java Method Throw
- 8.4.7 Method Body Page 290 - Java Method Body
- 8.4.8 Inheritance, Overriding, and Hiding Page 291 - Class Inheritance, Overriding, and Hiding - Java Inheritance, Overriding, and Hiding - Java Class Inheritance, Overriding, and Hiding - Class Inheritance, Class Overriding, and Class Hiding - Java Class Inheritance, Java Class Overriding, and Java Class Hiding
- 8.4.8.2 Method Hiding (by Class Methods) Page 296 - Java Method Hiding (by Class Methods)
- 8.4.8.3 Requirements in Overriding and Hiding Page 297 - Java Requirements in Overriding and Hiding
- 8.4.9 Overloading Page 302 - Java Overloading - Class Overloading - Method Overloading - Java Class Overloading - Java Method Overloading
- 8.7 Static Initializer Page 307 - Java Static Initializer - Class Initializer - Java Class Initializer
- 8.8.1 Formal Parameter Page 308 - Java Formal Parameter
- 8.8.2 Constructor Signature Page 309 - Java Constructor Signature
- 8.8.3 Constructor Modifier Page 310 - Java Constructor Modifier
- 8.8.5 Constructor Throw Page 311 - Java Constructor Throw
- 8.8.6 The Type of a Constructor Page 311 - Java Type of a Constructor
- 8.8.7 Constructor Body Page 311 - Java Constructor Body
- 8.8.7.1 Explicit Constructor Invocation Page 312 - Java Explicit Constructor Invocation
- 8.8.8 Constructor Overloading Page 317 - Java Constructor Overloading
- 8.8.9 Default Constructor Page 317 - Java Default Constructor
- 8.8.10 Preventing Instantiation of a Class Page 318 - Java Preventing Instantiation of a Class
- 8.9 Enum Classes 319 - Java Enum Class
- 8.9.1 Enum Constant Page 320 - Java Enum Constant
- 8.9.2 Enum Body Declaration Page 321 - Java Enum Body Declaration
- 8.9.3 Enum Member Page 323 - Java Enum Member
vii The Java Language Specification
- 8.10 Record Classes 328 - Java Record Class
- 8.10.1 Record Component Page 329 - Java Record Component
- 8.10.2 Record Body Declaration Page 330 - Java Record Body Declaration
- 8.10.3 Record Member Page 331 - Java Record Member
- 8.10.4.1 Normal Canonical Constructor Page 336 - Java Normal Canonical Constructor - Canonical Constructor - Java Canonical Constructor
- 8.10.4.2 Compact Canonical Constructor Page 337 - Java Compact Canonical Constructor
Java Language Specification Java SE 17 Edition Chapter 8 - Classes
Return to Java 17 Language Spec Table of Contents, Java 17 Language Spec, Java Language Specifications, Language Specifications, Java bibliography, Java DevOps, Java, Java topics, Awesome Java, Java development tools
NOTE!!! GETTING DokuWiki INTERNAL SERVER ERROR!!! Break this into smaller subchapter DokuWiki articles!
BREAK IT INTO SMALLER SECTION by section heading.
Break each sentence into snippets for that Java term, construct, grammar, etc. referencing this chapter. e.g. “ (JvLngSpc17 2021, Chapter 8 - Classes)
” (JSR-392 JvLngSpc17 2021)
“ (JvLngSpc17 2021)
Classes
“A class declaration defines a new class and describes how it is implemented (§8.1).” (JSR-392 JvLngSpc17 2021)
“A top level class (§7.6) is a class declared directly in a compilation unit.” (JvLngSpc17 2021, Chapter 8 - Classes)
“A nested class is any class whose declaration occurs within the body of another class or interface declaration. A nested class may be a member class (§8.5, §9.5), a local class (§14.3), or an anonymous class (§15.9.5).” (JvLngSpc17 2021, Chapter 8 - Classes)
“Some kinds of nested class are an inner class (§8.1.3), which is a class that can refer to enclosing class instances, local variables, and type variables.” (JvLngSpc17 2021, Chapter 8 - Classes)
“An enum class (§8.9) is a class declared with abbreviated syntax that defines a small set of named class instances.” (JvLngSpc17 2021, Chapter 8 - Classes)
“A record class (§8.10) is a class declared with abbreviated syntax that defines a simple aggregate of values.” (JvLngSpc17 2021, Chapter 8 - Classes)
“This chapter discusses the common semantics of all classes. Details that are specific to particular kinds of classes are discussed in the sections dedicated to these constructs.” (JvLngSpc17 2021, Chapter 8 - Classes)
“A class may be declared public (§8.1.1) so it can be referred to from code in any package of its module and potentially from code in other modules.” (JvLngSpc17 2021, Chapter 8 - Classes)
“A class may be declared abstract (§8.1.1.1), and must be declared abstract if it is incompletely implemented; such a class cannot be instantiated, but can be extended by subclasses. The degree to which a class can be extended can be controlled explicitly (§8.1.1.2): it may be declared sealed to limit its subclasses, or it may be declared final to ensure no subclasses. Each class except Object is an extension of (that is, a subclass of) a single existing class (§8.1.4) and may implement interfaces (§8.1.5).” (JvLngSpc17 2021, Chapter 8 - Classes)
“A class may be generic (§8.1.2), that is, its declaration may introduce type variables whose bindings differ among different instances of the class.” (JvLngSpc17 2021, Chapter 8 - Classes)
Page 235 CLASSES
”Class declarations may be decorated with annotations (§9.7) just like any other kind of declaration.“ (JvLngSpc17 2021, Chapter 8 - Classes)
“The body of a class declares members (fields, methods, classes, and interfaces), instance and static initializers, and constructors (§8.1.7). The scope (§6.3) of a member (§8.2) is the entire body of the declaration of the class to which the member belongs. Field, method, member class, member interface, and constructor declarations may include the access modifiers public, protected, or private (§6.6). The members of a class include both declared and inherited members (§8.2).” (JvLngSpc17 2021, Chapter 8 - Classes)
“Newly declared fields can hide fields declared in a superclass or superinterface.” (JvLngSpc17 2021, Chapter 8 - Classes)
“Newly declared member classes and member interfaces can hide member classes and member interfaces declared in a superclass or superinterface. Newly declared methods can hide, implement, or override methods declared in a superclass or superinterface.” (JvLngSpc17 2021, Chapter 8 - Classes)
”Field declarations (§8.3) describe class variables, which are incarnated once, and instance variables, which are freshly incarnated for each instance of the class. A field may be declared final (§8.3.1.2), in which case it can be assigned to only once. Any field declaration may include an initializer.“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Member class declarations (§8.5) describe nested classes that are members of the surrounding class. Member classes may be static, in which case they have no access to the instance variables of the surrounding class; or they may be inner classes.“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Member interface declarations (§8.5) describe nested interfaces that are members of the surrounding class.“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Method declarations (§8.4) describe code that may be invoked by method invocation expressions (§15.12). A class method is invoked relative to the class; an instance method is invoked with respect to some particular object that is an instance of a class. A method whose declaration does not indicate how it is implemented must be declared abstract. A method may be declared final (§8.4.3.3), in which case it cannot be hidden or overridden. A method may be implemented by platform-dependent native code (§8.4.3.4). A synchronized method (§8.4.3.6) automatically locks an object before executing its body and automatically unlocks the object on return, as if by use of a synchronized statement (§14.19), thus allowing its activities to be synchronized with those of other threads (§17 (Threads and Locks)).“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Method names may be overloaded (§8.4.9).“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Instance initializers (§8.6) are blocks of executable code that may be used to help initialize an instance when it is created (§15.9).“ (JvLngSpc17 2021, Chapter 8 - Classes)
Page 236 CLASSES
”Static initializers (§8.7) are blocks of executable code that may be used to help initialize a class.“ (JvLngSpc17 2021, Chapter 8 - Classes)
”Constructors (§8.8) are similar to methods, but cannot be invoked directly by a method call; they are used to initialize new class instances. Like methods, they may be overloaded (§8.8.8).“ (JvLngSpc17 2021, Chapter 8 - Classes)
Classes in OOP: Class (computer programming), Abstract base class (ABC), Abstract class, Class body - Method body, Class browser, Class constructor (Canonical constructor, Compact canonical constructor, Normal canonical constructor, Constructor body, Default constructor, Explicit constructor invocation, Constructor modifier, Constructor overloading, Constructor signature - Method signature, Generic constructor, Constructor throw, Type of a constructor), Class declaration, Class definition, Enum class (Enum constant, Enum body declaration, Enum member), Class field (Field modifier, Static field, Transient field, Volatile field, Field initialization), Formal parameter, Class hiding (Method hiding by class methods), Class hierarchy, Class inheritance (Inheriting methods with Override-Equivalent signatures), Class initializer (Static initializer), Inner class, Class instance - Class instantiation (Class instance initializer - Preventing instantiation of a class), Class library, Class modifier, Final Class - Final method, Generic class (Generic Method - Type parameter), Class implementation file, Class invariant, Class member (Member class and interface declarations), Class methods (Method declaration, Method modifier, Native method, Method result, Method signature, synchronized method, Method throw), Nested class, Overloading (Class Overloading - Method Overloading, Constructor overloading), Overriding (Class overriding - Method overriding - Method overriding by instance methods - Method overriding by class methods, Requirements in overriding and hiding), Record class (Record components, Record constructor, Record constructor declaration, Record body declaration, Record member), Sealed class - Non-sealed class, Static method, strictfp class - strictfp method, Superclass and Subclass (Direct Subclass), Superinterface, C++ classes, C# classes, Java classes, JavaScript classes, Kotlin classes, Python classes, Ruby classes, Scala classes, TypeScript classes, Class topics. (navbar_classes – Don't confuse Course with Class here!)
Java: Java Fundamentals, Java Inventor - Java Language Designer: James Gosling of Sun Microsystems, Java Docs, JDK, JVM, JRE, Java Keywords, JDK 17 API Specification, java.base, Java Built-In Data Types, Java Data Structures - Java Algorithms, Java Syntax, Java OOP - Java Design Patterns, Java Installation, Java Containerization, Java Configuration, Java Compiler, Java Transpiler, Java IDEs (IntelliJ - Eclipse - NetBeans), Java Development Tools, Java Linter, JetBrains, Java Testing (JUnit, Hamcrest, Mockito), Java on Android, Java on Windows, Java on macOS, Java on Linux, Java DevOps - Java SRE, Java Data Science - Java DataOps, Java Machine Learning, Java Deep Learning, Functional Java, Java Concurrency, Java History,
Java Bibliography (Effective Java, Head First Java, Java - A Beginner's Guide by Herbert Schildt, Java Concurrency in Practice, Clean Code by Robert C. Martin, Java - The Complete Reference by Herbert Schildt, Java Performance by Scott Oaks, Thinking in Java, Java - How to Program by Paul Deitel, Modern Java in Action, Java Generics and Collections by Maurice Naftalin, Spring in Action, Java Network Programming by Elliotte Rusty Harold, Functional Programming in Java by Pierre-Yves Saumont, Well-Grounded Java Developer, Second Edition, Java Module System by Nicolai Parlog
), Manning Java Series, Java Glossary, Java Topics, Java Courses, Java Security - Java DevSecOps, Java Standard Library, Java Libraries, Java Frameworks, Java Research, Java GitHub, Written in Java, Java Popularity, Java Awesome List, Java Versions. (navbar_java and navbar_java_detailed - see also navbar_jvm, navbar_java_concurrency, navbar_java_standard_library, navbar_java_libraries, navbar_java_navbars)
Fair Use Sources
© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.