Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Java memory model subclasses     - The multiplexed signal driving IO (Programming)

- A simple shell script for monitoring in Linux (Linux)

- Ubuntu 14.04 modify environment variables (Linux)

- SQLite database commonly used sentences and visualization tools on MAC MeasSQLlite use (Database)

- After restarting network services, DNS address failure (Linux)

- To compile install and test Swift under Linux (Linux)

- Remove old kernel on Ubuntu (Linux)

- rsync server set up (Server)

- CentOS7 virtual machine settings, and bridging problems (Linux)

- Binary tree to the next node (Programming)

- STL source code analysis - iterator each container classification (Programming)

- RedHat / CentOS ext4 partition can not be formatted large supplementary ext4 formatting (Linux)

- Oracle archive log deletion (Database)

- CentOS install SVN server configuration and automatically synchronized to the Web directory (Server)

- Java precision four operations (Programming)

- Ubuntu resolve sudo: source: command not found error (Linux)

- Linux security configuration (Linux)

- Linux itself disguised illusion strengthen security (Linux)

- Ubuntu PPA install SMPlayer 14.9 (Linux)

- How to add and delete bookmarks in Ubuntu (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 ISO document production OpenStack used CoreOS mirror (Linux)
- Using PPA to install the lightweight theme software HotShots 2.1.0 under Ubuntu (Linux)
- How to configure MariaDB replication in CentOS Linux (Database)
- How to use the process on the desktop xkill end Linux (Linux)
- MySQL database to open a remote connection method (Database)
- Ubuntu install Lighttpd + Mono support .net (Linux)
- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)
- Delay for the specified IP port analog network to send and receive packets on Linux (Linux)
- MySQL Tutorial: About checkpoint mechanism (Database)
- MySQL query optimization: profile function (Database)
- J2EE Example of Filter (Programming)
- Linux environment to build next Cocos2dx-3.3.1 (Linux)
- Lazarus IDE Start Basics Tutorial (Linux)
- 11G ASM disk group does not automatically handle MOUNT (Database)
- SQL Beginner Guide (Database)
- Upgrading to Debian 7.6 glibc 2.15 (Linux)
- Linux how to handle file names that contain spaces and special characters (Linux)
- ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], [] (Database)
- Using the Android interface in Parcelable (Programming)
- Web cache basics: terminology, HTTP headers, and caching policies (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.