Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Java memory model subclasses     - Use backup-manager system backup on Linux (Linux)

- Android judgment toward camera pictures (Programming)

- How to Install SeaMonkey 2.25 for Ubuntu (Linux)

- Locale files under Ubuntu (Linux)

- RHEL 6.4 installed MySQL 5.6.27 (Database)

- Debian users to install FFmpeg 2.2.2 (Linux)

- CentOS7 install JAVA notes (Linux)

- The temporary operation of the document mkstemp on Linux (Linux)

- jdbc Oracle database connection string writing pluggable (Database)

- AngularJS notes --- Scope and controller (Programming)

- Oracle 11g new features of the collection of multi-column statistics (Database)

- Linux using TCP-Wrapper Service Management (Linux)

- Apache Tomcat integration and resin (Server)

- How to identify memory leaks in Java (Programming)

- MySQL Tutorial: Some optimized for I / O memory areas (Database)

- The array of C language (Programming)

- git checkout generated in the use of temporary br (Linux)

- How to use scientific data Docker quickly configure the development environment (Server)

- Debian (Wheezy) were installed wxPython GUI development (Linux)

- ActiveMQ memory settings and flow control (Linux)

 
         
  Java memory model subclasses
     
  Add Date : 2018-11-21      
         
         
         
  Java memory model subclasses

package subClass;
class ParentClass {
public void fun () {
System.out.println ( "ParentClass ---> fun ()");
}
}

class SubClass extends ParentClass {
int i = 100;
String name = new String ( "SubClass");
public void fun () {
super.fun ();
System.out.println (name + "--->" + i);
}
}

public class TestExtends {
public static void main (String args []) {
SubClass sub = new SubClass ();
sub.fun ();
}
}



1.super is a reference to the parent class, when jvm loaded subClass, the reference to the parent class (super) loaded into subclasses stack memory.

2.this is a subclass reference when jvm loaded subClass, will refer to the current object (this) is stored in its own stack memory.

3. The specific call, first look to achieve the current sub-class, and if not, to find whether there is a parent class implementation.
     
         
         
         
  More:      
 
- Use CutyCapt to convert HTML pages to png images on Linux (Linux)
- Java Foundation - The relationship between abstract classes and interfaces (Programming)
- Linux Quick Install MongoDB (Database)
- Why is the ibdata1 file growing in MySQL? (Database)
- You know the difference between URL, URI and URN among you (Linux)
- How to manage and use Logical Volume Management LVM in Ubuntu (Linux)
- Linux server security settings to close unused ports (Linux)
- Ubuntu method for single-card dual-IP (Linux)
- How to achieve the MySQL Oracle table associated with the two operations update (Database)
- SQLite database commonly used sentences and visualization tools on MAC MeasSQLlite use (Database)
- Singleton (Linux)
- To setup Cocos2dx project under Ubuntu (Linux)
- Linux Nginx installation and configuration instructions (Server)
- Installation of network monitoring ntopng under CentOS 6.4 (Linux)
- Nodejs mysql pool Example (Programming)
- Generate two-dimensional code parsing code Java (Programming)
- SteamOS installation under Ubuntu 14.04 (Linux)
- Android first line of code study notes (Programming)
- Multipath configuration under Linux (Linux)
- Database start listening TNS-12537, TNS-12560 error (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.