![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
文章平均质量分 78
dymom
当爱生活遇上程序猿-爱生活的程序媛
展开
-
java 13:数组排序——选择排序及插入排序
1 选择排序Suppose that you want to sort a list in ascending order. Selection sort finds the smallest num-ber in the list and places it first. It then finds the smallest number remaining and places it原创 2014-06-28 13:43:04 · 700 阅读 · 0 评论 -
java 21 : StringBuilder/StringBuffer/String
前边我们已经有一篇详细讲解了下String,我们知道String 是一个final类,他不能被继承,不能b原创 2014-07-12 16:34:19 · 1153 阅读 · 0 评论 -
java3:类型转换(type casting)
1 数值类型转换原创 2014-06-21 01:18:07 · 2074 阅读 · 0 评论 -
java5:方法(method)
1 定义方法: Defining a MethodThe syntax for defining a method is as follows:modifier returnValueType methodName(list of parameters) {// Method body;}原创 2014-06-22 11:03:51 · 1376 阅读 · 0 评论 -
java1:从控制台读取输入
Java uses System.out to refer to the standard output device and System.in to the standard input device. By default the output device is the display monitor, and the input device is原创 2014-06-20 23:57:46 · 674 阅读 · 0 评论 -
java8:自上而下设计方法
如果让你写个程序,输入年月, 然后打印出这个月的日历?你原创 2014-06-22 14:38:16 · 984 阅读 · 0 评论 -
java9:一维数组的声明,创建,初始化(single-dimensional arrays)
在说数组之前,还是得先说下声明与定义: 变量的定义(definition):用于为变量分配存储空间,还可以为变量指定初始值。在一个程序中,变量有且仅有一个定义; 变量的声明(declaration):用于向程序表明变量的类型和名字。定义也是声明:当定义变量时我们声明了它的类型和名字。可以通过使用extern关键字声明变量名而不定义它。原创 2014-06-22 19:53:29 · 2825 阅读 · 0 评论 -
java4:选择语句(selection),逻辑运算,循环(loop)
其实,对于选择语句没什么好说的原创 2014-06-21 21:22:30 · 1395 阅读 · 0 评论 -
java6:方法重载(overload)
The max method that was used earlier works only with the int data type. But what if youneed to determine which of two floating-point numbers has the maximum value? The solution原创 2014-06-22 11:54:31 · 903 阅读 · 0 评论 -
java2:前缀,后缀运算,取余的符号问题,字面量
其实,我们一直都知道在任何一门语言中有前缀++,-- ,后缀++,--这样的运算,而在yu原创 2014-06-21 00:32:59 · 1167 阅读 · 0 评论 -
开类第一篇
其实因为一直有打算去阿里巴巴的原创 2014-06-20 23:27:28 · 645 阅读 · 0 评论 -
java 20:回文串检查,将16进制化为10进制
1 检查回文字符串import java.util.Scanner;public class CheckPalin{ public static void main(String [] args) { Scanner input=new Scanner(System.in); String s=input.nextLine(); int j=s.length()-原创 2014-07-03 21:03:13 · 1017 阅读 · 0 评论 -
java 14:对象与类,构造函数,访问对象
1 定义对象的类原创 2014-06-28 23:56:16 · 1730 阅读 · 0 评论 -
java10:复制数组
对于基本数据类型,我们可以原创 2014-06-27 20:14:38 · 650 阅读 · 0 评论 -
java 11:数组作为函数参数,数组做为函数返回值
我们可以将数组作为参数,传入到函数中,其实就像我们main函数中 public void mian原创 2014-06-28 00:06:11 · 27839 阅读 · 0 评论 -
java 15:静态变量,方法,常量
我们在上一篇的Circle类中,r(半j)原创 2014-06-29 10:24:22 · 697 阅读 · 0 评论 -
java 12:数组的搜索——线性查找及二分法查找
Searching is the process of looking for a specific element in an array—for example, discover-ing whether a certain score is included in a list of scores. Searching is a common task in com-puter pr原创 2014-06-28 12:19:36 · 3470 阅读 · 0 评论 -
java 16:可见性修饰符及单例模式
可见性修饰是用来修饰数据域跟原创 2014-06-29 10:58:55 · 1103 阅读 · 0 评论 -
java 18:给方法传递对象参数,对象数组
通过我们前边关于传递数组给方法,传递的是数组的引用。tong原创 2014-07-01 22:53:47 · 8778 阅读 · 1 评论 -
java 17:数据域封装
在我们上一篇用的例子CircleCount中使用的r跟count原创 2014-07-01 22:15:12 · 2763 阅读 · 0 评论 -
java 19:不可变字符串和限定字符串(Immutable String and Interned String)
1 String 的构造Astringis a sequence of characters. In many languages, strings are treated as an array of characters, but in Java a string is an object. The Stringclass has 11 constructors and more than原创 2014-07-02 20:45:40 · 2675 阅读 · 1 评论 -
java7: 使用随进函数产生特定范围的随机整数及随机字符
我们在之前的例子中都经常会使用到Math.random来产生原创 2014-06-22 13:01:24 · 1747 阅读 · 0 评论