- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 病的不轻
有够无聊的,自己编了个选彩票的小程序,双色球的;准备去医院; 9/24/2009 4:49:51 PMpackage ComprehensiveExercises;import java.util.Random;public class Lottery { public static void main(String[] args) {
2009-09-24 16:47:00 252
原创 map用法的一点小小总结
map的用法,发现这种东西还是要研究套路,套路熟了再去研究它的所以然,硬生生的对着书看,确实有点浪费时间,一,首先是导入各种包,import java.util.Map;import java.util.HashMap;import java.util.Set;二,接着构建一个属于map类hashmap的对象,括号内为对应的key和value类型,Map map=new H
2009-09-24 14:17:00 426
原创 String总结-部分
Modifier and TypeMethod and Description charcharAt(int index) Returns the char value at the specified index.public class TestCharAt { public
2009-09-23 23:22:00 340
原创 updating Inheritance
Inheritance SyntaxWhen you using the keyword extends followed by the name of the base class,when you do this,you automatically get all the fields and methods in the base class. When you created
2009-09-23 21:04:00 232
原创 be sick
好舊沒病了,而這麽一病,來的也有些生猛。思緒很混亂,很混亂。 有些話還是說不出來,即使面對熒光屏,我也是無語。 大概39度+的樣子,渾身燙燙的。 而這不是你鬆懈的藉口。 你還活著,很多事情還等著你去做。那些一定要做的事。
2009-09-23 20:52:00 278
原创 Initialization
关于构造,程序语言中数据初始化是个极其重要的问题,Java也不例外,由此产生了构造的概念,The name of the constructor is the same as the name of the class,it maks sense that such a method will be called automatically during initialization.cl
2009-09-23 01:53:00 349
原创 Controlling Execution
似乎没什么好说的,foreach是一个语法现象。接着是break,continue,break直接跳出循环,continue则略过循环中的其他step直接从头开始,举2个例子吧。第一个是100以内的全部素数。public class Su { public static void main(String[] args) { for(int i=2;i
2009-09-22 22:46:00 250
原创 Operators
x+=4,which means x=x+4.to add 4 to the variable x and assign the result to x. 关于随机数的生成。格式Import java.util.Random;Random rand=new Random(47); //这里键入一个值,会使结果变的固定Int i=rand.nextInt(36)+1; 这里就
2009-09-22 21:06:00 242
原创 Everything is a object
Class关键字,用来引导类的建立。类是java语言的核心,也就是各种type。Java语言很强调值的类型,因为计算机必须要有type类型指导才可以识别。因此,方法的定义为Return type +method name(argument list) { argument包括变量类型就是classname,变量名称(随便叫什么)Method bod
2009-09-22 19:45:00 262
原创 Thinking In Java-update0921
无语。接连发了2篇都夭折了。辛苦码了那么多字。算了,直接从第3章开始了。 Initialization关于构造器:class Rock { Rock() { System.out.print("Rock "); }}public class SimpleConstructor { public static void main(String[] args
2009-09-21 06:09:00 342
转载 java对象equals方法的重写
转自:http://blog.csdn.net/icecityman/archive/2008/12/24/3593660.aspx 什么时候需要重写equals()? 我们知道每一个java类都继承自Object类,equals()是Object类中提供的方法之一。那么,让我们先来看看Object#equals()在Java中的原代码:public boolean equals(
2009-09-20 21:14:00 295
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人