public static void main(String[] args) { List<String> parentList = new ArrayList<String>(); for(int i = 0; i < 5; i++){ parentList.add(String.valueOf( ...
分类:
编程语言 时间:
2016-05-23 10:39:11
阅读次数:
169
java String.split(); 别的不说,单说其中一个问题,这个函数去切分空字符串时,得到的结果; public static void main(String[] args) {// String countType = "3,3"; String countType = "";// S ...
分类:
编程语言 时间:
2016-05-23 10:28:51
阅读次数:
133
.编写一个Java应用程序,该程序包括3个类:Monkey类、People类和主类 E。要求: (1) Monkey类中有个构造方法:Monkey (String s),并且有个public void speak() 方法,在speak方法中输出“咿咿呀呀......”的信息。 (2)People类 ...
分类:
其他好文 时间:
2016-05-23 10:22:50
阅读次数:
124
static public bool IsEmail(string email) { string pattern = @"^\w+([-+.]\w*)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"; return Regex.IsMatch(email, pattern); } ...
分类:
其他好文 时间:
2016-05-23 09:10:22
阅读次数:
186
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.o ...
分类:
其他好文 时间:
2016-05-23 09:05:28
阅读次数:
150
图片保存到数据库的方法: public void imgToDB(string sql) { //参数sql中要求保存的imge变量名称为@images //调用方法如:imgToDB("update UserPhoto set Photo=@images where UserNo='" + tem ...
分类:
数据库 时间:
2016-05-23 09:04:28
阅读次数:
176
当java的子类和父类具有相同名字的属性时,到底java是怎么处理的。 先看代码: package com.joyfulmath.study.field; public class Person { public String name; public String getName() { retu ...
分类:
编程语言 时间:
2016-05-23 09:04:13
阅读次数:
385
运算符1. 谨慎定义类型转换函数有两种函数允许编译器进行这些的转换:单参数构造函数(single-argument constructors)和隐式类型转换运算符。单参数构造函数是指只用一个参数即可以调用的构 造函数。该函数可以是只定义了一个参数,也可以是虽定义了多个参数但第一个参数以后的 所有参数都有缺省值。 第一个例子:class Name {
public:
Name(const stri...
分类:
编程语言 时间:
2016-05-23 06:50:51
阅读次数:
235
// simple stack.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#includeusing namespace std;const int SIZE = 100;class Stack{ public: void init() { position... ...
分类:
其他好文 时间:
2016-05-23 06:43:11
阅读次数:
115
1)如果在一个类的内部再定义一个类,就是内部类,而外面的类叫外部类。 2)内部类可声明为public或private访问权限,对内部类的用法和限制与对成员变量和成员方法是相同的。 例子: 以上程序中,Inner作为内部类,并且在外部类的fun()方法中直接实例化内部类对象,并调用print()方法。 ...
分类:
其他好文 时间:
2016-05-23 06:37:38
阅读次数:
207