今天朋友几篇文章介绍了改classjava的文章. 关联文章的地址
A package statement must appear as the first line in a source code file (excluding blank lines and comments).
A native method is a method that is implemented in a language other than java.
Order of precedence determines the order in which operators are evaluated in expressions. Associatlity determines whether an expression is evaluated left-to-right or right-to-left.
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
The range of the char type is 0 to 2^16-1(i.e. 0 to 65535).
The range of the short type is –(2)^15 to 2^15-1. (i.e. -32768 to 32767)
Because C++ has proven by example that operator overloading marks code almost impossible to maintain.
Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class. Static methods can be referenced with the name of the class rather than the name of a particular object of the class(though that works too). That’s how library methods like System.out.println() work. Out is a static field in the Java.lang.System class.
The null value is not a keyword.
The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.
It is written x?y:z
The fractional part of the result is truncated. This is known as rounding towards zero.
A class that is declared without any access modifiers is said to have package access. This means that the class only be accessed by other classes and interfaces that are defined within the same package.
文章结束给大家分享下程序员的一些笑话语录: 大家喝的是啤酒,这时你入座了。
你给自己倒了杯可乐,这叫低配置。
你给自已倒了杯啤酒,这叫标准配置。
你给自己倒了杯茶水,这茶的颜色还跟啤酒一样,这叫木马。
你给自己倒了杯可乐,还滴了几滴醋,不仅颜色跟啤酒一样,而且不冒热气还有泡泡,这叫超级木马。
你的同事给你倒了杯白酒,这叫推荐配置。
菜过三巡,你就不跟他们客气了。
你向对面的人敬酒,这叫p2p。
你向对面的人敬酒,他回敬你,你又再敬他……,这叫tcp。
你向一桌人挨个敬酒,这叫令牌环。
你说只要是兄弟就干了这杯,这叫广播。
有一个人过来向这桌敬酒,你说不行你先过了我这关,这叫防火墙。
你的小弟们过来敬你酒,这叫一对多。
你是boss,所有人过来敬你酒,这叫服务器。
酒是一样的,可是喝酒的人是不同的。
你越喝脸越红,这叫频繁分配释放资源。
你越喝脸越白,这叫资源不释放。
你已经醉了,却说我还能喝,叫做资源额度不足。
你明明能喝,却说我已经醉了,叫做资源保留。
喝酒喝到最后的结果都一样
你突然跑向厕所,这叫捕获异常。
你在厕所吐了,反而觉得状态不错,这叫清空内存。
你在台面上吐了,觉得很惭愧,这叫程序异常。
你在boss面前吐了,觉得很害怕,这叫系统崩溃。
你吐到了boss身上,只能索性晕倒了,这叫硬件休克。
--------------------------------- 原创文章 By
class和java
---------------------------------