
Java SE
文章平均质量分 53
MJN
programming and sharing.
展开
-
Recommended order of a field's mutiple modifiers
Field declarations can also be preceded by modifiers that control certain properties of the field:annotations access modifiers static final transient volatile A field cannot be both final and volatile.When multiple modifiers are applied to the same field d原创 2011-05-11 18:22:00 · 603 阅读 · 0 评论 -
如何设置Java桌面程序界面外观(How to Set the Look and Feel)
内容目录:1. 使用UIManager.setLookAndFeel通过编程来指定界面外观2. UI Manager如何选择界面外观?3. 启动后, 改变界面外观1. 使用UIManager.setLookAndFeel通过编程来指定界面外观.示例代码如下:[1]import javax.swing.*;import java.awt.*;public c翻译 2011-09-12 14:25:32 · 18517 阅读 · 2 评论 -
【Java IO】带缓冲的任意文件的复制
/** * 带缓冲功能(缓冲大小8K)的任意文件的复制(字节流) * @author MJN * @date 2011-10-03 */public class FileCopyWithBuffer { public static void main(St原创 2011-10-03 22:32:55 · 1681 阅读 · 0 评论 -
【Java IO】DataInputStream/DataOutputStream示例
package mjn.io;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.EOFException;import java.io.FileInputStrea原创 2011-10-04 11:16:08 · 3214 阅读 · 2 评论 -
【Java IO】文件操作
本文目录:1. 移动文件/重命名2. 删除文件3. 列出目录下的文件1. 移动文件/重命名package mjn.io;import java.io.File;/** * 文件操作: 移动文件/重命名 * @author MJN * @date原创 2011-10-03 23:09:07 · 894 阅读 · 0 评论 -
【I/O】Character Streams
本文目录:Character StreamsReaderread()read(char[] buf, int offset, int count)read(char[] buf)read(java.nio.CharBuf原创 2011-09-30 18:11:21 · 1151 阅读 · 0 评论 -
【I/O】Byte Streams
本文目录:Byte StreamsInputStreamread()read(byte[] buf, int offset, int count)read(byte[])skip(long count)availab原创 2011-09-30 15:06:58 · 1222 阅读 · 0 评论 -
Write a method that counts the number of occurrences of a given character in a string
1、Write a method that counts the number of occurrences of a given character in a string2、Write a method that counts the number of occurrences of a particular string in another string原创 2011-05-26 14:11:00 · 1393 阅读 · 0 评论 -
Method of Overriding and Overloading
Method of Overriding and Overloading原创 2011-05-13 13:37:00 · 828 阅读 · 0 评论 -
Signature of a method
Signature of a method原创 2011-05-12 19:44:00 · 2250 阅读 · 0 评论 -
Recommended order of a method's mutiple modifiers
The method modifiers consist of the following:annotationsaccess modifiers abstract static final: A final method cannot be overridden in a subclass.synchronized: A synchronized method has additional semantics related to the control of concurrent threads wit原创 2011-05-11 20:51:00 · 767 阅读 · 0 评论 -
Default initial value of a field
<br /> <br />If a field is not initialized a default initial value is assigned to it depending on its type:<br /> <br /> <br /><br /> <br />Reference: The Java Programming Language, the Fourth Edition原创 2011-05-11 18:28:00 · 728 阅读 · 0 评论