Here is the code:

 /*
Instance invocation in the memory: */
package kju.obj; import static kju.print.Printer.*;
public class NonStaticInvoke {
public static void main(String[] args) {
Person p = new Person("lily");
p.setName("lucy");
}
} class Person {
public static final String country = "cn";
private String name;
public Person(String name) {
this.name = name;
} public static void showCountry() {
println("country = " + country);
} public void setName(String name) {
this.name = name;
}
}

The figure below corresponds to the above code:

Simple screenshot that explains the non-static invocation.的更多相关文章

  1. Simple screenshot that explains the singleton invocation.

    Here is the code: /* Some class,such as a config file,need to be only one.So we need to control the ...

  2. recursive - simple screenshot but detail principle.

    the code below demonstates the principle of the'recursive-call' that the programing beginner may be ...

  3. 关于java的static关键字

    通常来说,当你创建类时,就是在描述那个类的对象的外观与行为.除非你用new创建那个类的对象,否则,你实际上并未获得任何东西.当你用new来创建对象时,数据存储空间才被分配,其方法才供外界调用. 但是有 ...

  4. php Late Static Bindings延迟静态绑定

    官网说道: As of PHP 5.3.0, PHP implements a feature called late static bindings which can be used to ref ...

  5. selenium2截图ScreenShot的使用

    截图是做测试的基本技能,在有BUG的地方,截个图,保留失败的证据,也方便去重现BUG.所以,在自动化的过程中,也要能截图,也要能在我们想要截取的地方去截图,且能在错误产生时,自动的截图. 示例: 脚本 ...

  6. Standard C++ Programming: Virtual Functions and Inlining

    原文链接:http://www.drdobbs.com/cpp/standard-c-programming-virtual-functions/184403747 By Josée Lajoie a ...

  7. Burp Suite教程(英文版)

    In this article, we are going to see another powerful framework that is used widely in pen-testing. ...

  8. Understanding Network Class Loaders

    By Qusay H. Mahmoud, October 2004     When Java was first released to the public in 1995 it came wit ...

  9. 高性能服务器设计(Jeff Darcy's notes on high-performance server design

    高性能服务器设计(Jeff Darcy's notes on high-performance server design 我想通过这篇文章跟大家共享一下我多年来怎样开发“服务器”这类应用的一些想法和 ...

随机推荐

  1. Hidden Password

    zoj1729:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=729 题意:就是求字符串的最小表示,模板题. 题解:直接贴模板. ...

  2. 在非UI线程中更改UI(Delphi使用隐藏窗口来处理,QT使用信号槽)

    在Delphi里我记得是使用TThread.Synchronize(TThreadMethod),原理是利用了一个隐藏窗口来处理. 在QT Debug模式一下,碰到了同样的问题,显示错误: canno ...

  3. ubuntu下virtualbox使用u盘

    1.virtualbox中使用u盘流程 以下是使用U盘的整个流程(参考了网络上其他人的教程,亲测可用): 添加当前用户为vboxusers一员 终端输入:cat /etc/group |grep vb ...

  4. struts1 工作原理

    struts1的原理和工作流程 struts1的工作原理或者说工作流程: 1.在web应用程序启动就会加载ActionServlet,ActionServlet从配置文件struts-config.x ...

  5. MapReduce扩展:应用程序如何运行于Hadoop Yarn之上

    1. 背景   “应用程序运行于Hadoop Yarn之上”的需求来源于微博运维数据平台中的调度系统,即调度系统中的任务需要运行于Hadoop Yarn之上.这里的应用程序可以简单理解为一个普通的进程 ...

  6. Linux学习笔记24——进程管道

    一 管道的作用 通常把一个进程的输出通过管道连接到另一个进程的输入. 二 popen和pclose函数 #include <stdio.h> FILE *popen(const char ...

  7. Myriad2 简介

    本文翻译自英文: Myriad2图像处理器是一个永远在线的移动视觉处理器系统.它提供了非常强处理能力和及其高效了内存带宽以满足计算机视觉和计算成像应用的需求. Myriad2同时也满足移动设备的非常低 ...

  8. zabbix 飞信集成配置

    1.环境说明: (Gentoo Linux环境) # uname -a Linux Crob 2.6.34-gentoo #1 SMP Mon May 31 15:45:25 CST 2010 x86 ...

  9. 网站优化与Cdn文件传输服务

    网站优化与Cdn文件传输服务 如今互联网无处不在,其方便快捷.性质和低成本的经济特点,已经逐渐成为商务贸易.信息分发和数据交付的一个重要渠道.要想让数据的分发带来巨大的效益,那么网民的满意是唯一的办法 ...

  10. Graphs and Minimum Cuts(Karger's Min-Cut Algorithm)

    Graphs  Two ingredients 1. vertices (nodes) v 2. edges(undirected or directed) Examples: road networ ...