Just a memo for me to remember the difference.
class Holder {
public static void sayHello() {
System.out.println("Hello, World!\n");
}
}
public class Foo {
public static void main (String [] args) {
Holder.sayHello();
Holder h1 = new Holder();
h1.sayHello();
}
}
#include <iostream>
#include <string>
using namespace std;
struct Holder {
public:
static void sayHello() {
cout << "Hello, World!\n";
}
};
int main(int argc, const char *argv[]) {
Holder::sayHello();
Holder h;
h.sayHello();
return 0;
}
分享到:
相关推荐
This document is all about the LINQ
This updated handy quick C++ 14 guide is a condensed code and syntax reference based on the newly updated C++ 14 release of the popular programming language. It presents the essential C++ syntax in a ...
This updated handy quick C++ 14 guide is a condensed code and syntax reference based on the newly updated C++ 14 release of the popular programming language. It presents the essential C++ syntax in a ...
This updated handy quick C++ 14 guide is a condensed code and syntax reference based on the newly updated C++ 14 release of the popular programming language. It presents the essential C++ syntax in a ...
C++ Quick Syntax Reference.pdf
This quick C++17 guide is a condensed code and syntax reference to the popular programming language, fully updated for C++17. It presents the essential C++ syntax in a well-organized format that can ...
1. C++ 14 Quick Syntax Reference, 2nd Edition 2. C++ 17 Quick Syntax Reference, 3nd Edition 3. Discovering Modern C++ 三本书籍合体
Java Methods-Java Syntax and Style.ppt
This updated handy quick C++ 14 guide is a condensed code and syntax reference based on the newly updated C++ 14 release of the popular programming language. It presents the essential C++ syntax in a ...
java syntax(語法基礎)
Python for the Busy Java Developer The Language, Syntax, and Ecosystem 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Introduce java basic syntax and data types etc.
C++ Quick Syntax Reference 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或...
C++ Syntax, Data Structures, and Algorithms Cheat Sheet
java syntax represented by bnf
Rcpp attributes provide a high-level syntax for declaring C++ functions as callable from R and automatically generating the code required to invoke them. Attributes are intended to facilitate both ...
For example, both Java and C# are descended from C++. Frankly, to be a professional programmer implies proficiency in C++. It is the one language that no programmer can afford to ignore. This is the ...
Are you a seasoned Java developer who wishes to ...Understand Python syntax and the differences between Python 2.x and 3.x Explore the Python ecosystem, its standard libraries, and how to implement them