
pure Java
rmn190
这个作者很懒,什么都没留下…
展开
-
java接口的一些生动的例子
你应该知道接口是一种契约,它与实现方式无关但是类,即使是抽象类,你都能自定义成员变量,而成员变量往往就与实现方式有关。这一点的实际意义不大。但是有一点,类会暴露太多不必要,甚至不能暴露的东西,你看一下java.util中,大部分的数据结构,都被设计成了接口-抽象类-最后实际类例如Collection-List L-AbstractCollection L-Abs转载 2007-02-25 17:45:00 · 1655 阅读 · 0 评论 -
Using Swing Components(1)
using top-level containers (JFrame,JDialog,JApplet) !these facts should be kept in mind: !! To appear onscreen,every GUI component must be part of a containment hierarchy.A containment hierarchy is原创 2007-01-16 21:12:00 · 938 阅读 · 0 评论 -
String,StringBuffer与StringBuilder的区别??
String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全) 简要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等同于生成了一个新的 String 对象,然后将指针指向新的 String 对象,所以经常改变内容的字转载 2007-01-24 11:56:00 · 799734 阅读 · 272 评论 -
国际化软件工程师的成才之路
国际化软件工程师的成才之路 北京航空航天大学 2005-8-17 13:10:36 点击:188 次 发表评论 主讲人:孙伟主讲人介绍:北京航空航天大学软件学院院长;北京航空航天大学学术委员;学位转载 2007-01-22 12:40:00 · 2623 阅读 · 0 评论 -
Java语言与Generics
一 Generics简介Generics是程序设计语言的一种技术,指将程序中数据类型进行参数化,它本质上是对程序的数据类型进行一次抽象,扩展语言的表达能力,同时支持更大粒度的代码复用。对于一些数据类型参数化的类和方法来说,它们往往具有更好的可读性、可复用性和可靠性。在设计集合类和它们的抽象操作时,往往需要将它们定义为与具体数据类型无关,在这种情况下,使用Generics就是非常适合的。举例来说,转载 2007-01-22 14:27:00 · 2883 阅读 · 0 评论 -
关于JFrame的背景色设置????
import javax.swing.JFrame;import java.awt.Toolkit;import java.awt.Dimension;import java.awt.Image;import java.awt.Color;import java.awt.Graphics;public class CenteredFrameTest { public static void m原创 2007-03-13 14:51:00 · 5289 阅读 · 0 评论 -
Best Practices for Exception Handling
One of the problems with exception handling is knowing when and how to use it. In this article, I will cover some of the best practices for exception handling. I will also summarize the recent debate转载 2007-01-25 15:27:00 · 4649 阅读 · 0 评论 -
To jar or not to jar?
http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar.html转载 2007-05-08 14:56:00 · 1051 阅读 · 0 评论 -
Java收集
1.JAVA进阶:提高代码可重用性的三个措施 http://www.enet.com.cn/article/2007/0413/A20070413541462.shtml2.Java初学者都必须理解的六大问题http://www.c114.net/study/pxread.asp?articleid=11553.JAVA中用接口实现多继承和多态的方法http://www.c1原创 2007-05-09 20:22:00 · 1046 阅读 · 0 评论 -
break and continue
前段时间学Java时,在break与continue上的理解与应用总觉得欠点什么,虽说也能模模糊糊地掌握,可深度总是不够,心里边也总是不那么亮堂。现在学JavaScript时见到一个不错的例子,现在把它总结下。 continue时 For(int i = 0;i If(i = =3)continue;System.out.println("The number is:"+i); }结原创 2007-05-15 14:17:00 · 917 阅读 · 0 评论 -
Java源程序编译为.exe文件
第一種:在jbuilder中: 首先你要保证Run菜单-->Run Project能顺利运行 然后Wizards菜单-->Native Executable Builder 选中Compress the contents of the archive(产生jar文件的话) Next-->Next-->选中Always include all classes and转载 2007-01-16 12:28:00 · 2078 阅读 · 0 评论 -
about GridBadLayout??
範列1: gridx、gridygridx與gridy是用以指定元件的相對位置,由範例1可以看出當gridx及gridy的值變化時,對於Button的位置的改變,gridx和gridy的值是相對的,也就是說gridx值越大的排在越右邊,gridy越大的排在越下面。 import java.awt.*; public class Sample1 extends Frame {转载 2007-01-15 21:12:00 · 1125 阅读 · 0 评论 -
jEdit应用指南【基础篇】
jEdit应用指南【基础篇】作者:tedeyang创作时间:2005年9月24日 序 jEdit是一个非常强大和灵活的文本编辑器.在java开发过程中,我一直使用eclipse,UltraEdit和jEdit.经常在它们之间来回切换.因为ultraEdit太简单,而eclipse又太复杂,所以现在我要介绍的就是简单又复杂的jEdit,它将大大加速你的编程,我会转载 2007-01-20 15:10:00 · 12657 阅读 · 1 评论 -
to-do for 'MyHelloSwing'
import javax.swing.*;/*public class MyHelloSwing{ public static void main(String [] args){ JFrame f = new JFrame("HelloWorldSwing!"); JLabel l = new JLabel("Hello World,its mine!!!"); //f.getContentP原创 2007-01-11 09:46:00 · 811 阅读 · 0 评论 -
关于JFrame,JPane及其它容器的层次关系????
/* * SwingApplication.java is a 1.4 example that requires * no other files. */import javax.swing.*; import java.awt.*;import java.awt.event.*;public class SwingApplication implements Action原创 2007-01-11 16:11:00 · 4266 阅读 · 0 评论 -
TextSamplerDemo.java代码分析
/* * TextSamplerDemo.java requires the following files: * TextSamplerDemoHelp.html (which references images/dukeWaveRed.gif) * images/Pig.gif * images/sound.gif */import javax.swing.*;import j原创 2007-01-15 17:56:00 · 1397 阅读 · 1 评论 -
gridbaglayout
how to use gridbaglayout 1,the way the program specifies the size and position characteristics of its components is by spedifying constraints for each component.to specify constraints,you set instanc原创 2007-01-16 10:10:00 · 2146 阅读 · 0 评论 -
gridbaglayout(2)
13,"To specify constraints, you set instance variables in a GridBagConstraints object and tell the GridBagLayout (with the setConstraints method) to associate the constraints with the component." 要原创 2007-01-16 15:03:00 · 885 阅读 · 0 评论 -
JComponent Class
#The JComponent Class !introduction !!from which all Swing components whose names begin with "J" descend,except for the top-level containers !!extends the Container class,which itself extends Com原创 2007-01-17 17:09:00 · 1156 阅读 · 0 评论 -
程序员一定会感兴趣的问题 开发人员需要知道的东西杂谈
鉴于经常看到很多傻傻的问题,比如xx语言干什么用的,xxx语言是不是落伍了?(不过说实在的,这些问题初学者都会有.) 我在这里说说开发人员应该知道的一些东西。但是这些只是我在平日里看到和想到的。难免有所偏差,请见谅. 软件开发,是一个综合性的活计。软件开发,并不仅仅是编写代码.学会了用c这些编程语言进行编程只是第一步,一个最最基本要求。其他要的东西还多着呢。在我看来,程序员大致可以分为两转载 2007-01-18 12:22:00 · 1514 阅读 · 0 评论 -
Atomic Access in thread
!Atomic Access(an atomic action cannot stop in the middle;no side effects of an atomic action are visible until the action is complete): !Reads and writes are atomic for reference variables a原创 2007-01-15 14:11:00 · 1123 阅读 · 0 评论 -
Processes and Threads
Processes and Threads (two basic units of execution in concurrent programming:OS feature called time slicing) 1,process: a process has a self-contained execution environment(a complete,private set of原创 2007-01-15 14:16:00 · 914 阅读 · 0 评论 -
Input and Output(easy to use)
Input and OutputTo make our example programs more interesting, we want to accept input and properly format the program output. Of course, modern programs use a GUI for collecting user input. However,转载 2007-06-05 14:02:00 · 1318 阅读 · 0 评论