- 浏览: 59765 次
- 性别:
- 来自: 北京
-
最新评论
-
zeyuphoenix:
问题14:
对于emp中同一部门低于自己工资至少3人的员工,列 ...
SQL面试题(十) -
zeyuphoenix:
问题13:
对于emp中低于自己工资至少5人的员工,列出其部门 ...
SQL面试题(十) -
zeyuphoenix:
问题12:
对于emp中工资高于本部门平均水平,人数多与1人的 ...
SQL面试题(十) -
zeyuphoenix:
问题11:
对于emp,列出各个部门中平均工资高于本部门平均水 ...
SQL面试题(十) -
zeyuphoenix:
问题10:
对于工资高于本部门平均水平的员工,列出部门号,姓名 ...
SQL面试题(十)
文章列表
public class NodeTest {
/** 得到Node,两个元素,一个为值,一个为指向下个值的指针。 */
static private class Node {
public int data;
public Node nextNode;
}
/**得到链表的总数,正向计数得到总数-k*/
private static int findNode(Node headNode, int k) {
int count = 0;
Node node = headNode;
while (node.nextNode != ...
- 2009-03-20 13:22
- 浏览 704
- 评论(0)
1 2 2 3 4 5生成4不在第3位 3 5不相邻的不重复的6位数
public class CreateNum {
// ******************************************************************************
private int[] numbers = new int[] { 1, 2, 2, 3, 4, 5 };
public int n;
private String lastResult = "";
private boolean validate(String s) ...
- 2009-03-20 13:20
- 浏览 769
- 评论(0)
import java.util.Arrays;
/**
* The Class Sort.
*/
public class Sort {
/**
* The main method.
*
* @param args
* the args
*/
public static void main(String[] args) {
int[] arrs = new int[] { 121, 32, 14, 125, 638, 119, 230, 469 };
bubbleSort(arrs.clone()); ...
- 2009-03-20 13:18
- 浏览 731
- 评论(0)
字符串循环比较
/**
* @param args
*/
public static void main(String[] args) {
String root = "AABBCD";
String compare = "CDAA";
System.out.println(compareString(root, compare));
}
public static boolean compareString(String root, String compare) {
if (compare. ...
- 2009-03-20 11:58
- 浏览 888
- 评论(0)
public static void main(String[] args) {
String df = "/udd/itnms/file/123dd.dd.pdf";
System.out.println(changeFileType(df));
Properties d = new Properties();
System.out.println(d.getProperty("key"));
String ttt = "ff_d.22.2.txt";
...
- 2009-03-20 11:55
- 浏览 780
- 评论(0)
/**
* md5 common class<br>
* MD5.java
* @author <br>
* 2007/11/19 11:51:59
*/
public class MD5 {
/**
* MD5 instance class
*/
private static MD5 instance = null;
// MD5
private MessageDigest _md5 = null;
/**
* MD5 instance get.
* @return MD5 ...
- 2009-03-20 11:51
- 浏览 812
- 评论(0)
/**
* LoadXMl.java
* @author <br>
* 2007/11/09 13:49:35
*/
public class LoadXMl {
/**
* LoadXMl
*/
public LoadXMl() {
}
/**
* LoadXMl
* @param fullPath
* @return Properties
* @throws Exception
*/
public static Properties loadProperties(String ...
- 2009-03-20 11:50
- 浏览 673
- 评论(0)
/**
* JTextField input Check
*
* @author shuai.zhang
*/
public class InputCheck extends KeyAdapter {
/**
* check is none.
*/
public static final int NONE = 0;
/**
* number check.
*/
public static final int NUMBER = 1;
/**
* half char check.
*/
public stat ...
- 2009-03-20 11:49
- 浏览 764
- 评论(0)
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
/**
*
* @author shuai.zhang
*/
public class MyEclipseCrack {
p ...
- 2009-03-20 11:45
- 浏览 942
- 评论(0)
截取字符串,不允许出现半个的,例如123卡3,截取4位是123
/**
* @param args
*/
public static void main(String[] args) {
String info = "1234か5sss";
System.out.println(subString(info, 6));
}
public static String subString(String strInfo, int subLength) {
if (strInfo == null) {
throw n ...
- 2009-03-20 11:44
- 浏览 906
- 评论(0)
线程传递值:
public class TestThread {
public static void main(String[] args) {
MyThread t = new MyThread(new Work());
t.start();
}
}
class Data {
private int data = 0;
public int getData() {
return data;
}
public void setData(int data) {
this.data = data;
}
}
...
- 2009-03-20 11:40
- 浏览 834
- 评论(0)
1.测试for循环的输出:
public class TestOutput {
public static void main(String[] args) {
int i = 0;
for (foo('A'); foo('B') && (i < 3); foo('C')) {
i++;
foo('D');
}
}
static boolean foo(char c) {
System.out.print(c);
return true;
}
}
输出结果为:
ABDCBDCBDCB
...
- 2009-03-20 11:36
- 浏览 706
- 评论(0)
计算一系列数字有多少个指定字,例如1-12有5个1
public static void main(String[] args) {
System.out.println(countNum(120000));
}
public static int countNum(int number) {
int count = 0;
StringBuffer buffer = new StringBuffer("");
for (int i = 1; i <= number; i++) {
buffer.append(i ...
- 2009-03-20 11:34
- 浏览 797
- 评论(0)
输入数字,转换为汉字:
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(changeNumber(123003098));
}
public static String changeNumber(int number) {
StringBuffer buffer = new StringBuffer("");
char[] nums = Integer.valueOf(number).toString().to ...
- 2009-03-20 11:32
- 浏览 774
- 评论(0)
取得一个数组的最大值和次最大值:
public static void main(String[] args) {
int[] nums = { 2, 3, 4, 1, 2 };
System.out.println(getMax(nums));
System.out.println(getPerMax(nums));
}
public static int getMax(int[] nums) {
int max = Integer.MIN_VALUE;
if (nums == null || nums.length == 0) {
t ...
- 2009-03-20 11:30
- 浏览 772
- 评论(0)