`
zeyuphoenix
  • 浏览: 55697 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
public class Insert { /** * @param args */ public static void main(String[] args) { System.out.println(insert("ab打def", "abc", 3)); System.out.println(inversion("ab打def")); } /** * 插入字符串 */ public static String insert(String info, String i ...
 // 求101—200之间的素数个数? public class GetPrime { /** * @param args */ public static void main(String[] args) { List<Integer> arrays = getPrime(200); List<Integer> result = new ArrayList<Integer>(); for (Integer info : arrays) { if (info > 101) { resul ...
public class GetMax { 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 == n ...
//统计字符串中相同字符的个数 import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class CountChar { /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { String str = " ...
// 有两个数组A,B,B数组中的元素包含在A数组中,// 请写一段代码把A数组中B没有的元素放到C数组中。// 假如数组中都是数字,而且已经按大小排序,请写一段代码最快效率把// 上面的元素放到C数组中。 /** * The Class CopyArray. */ public class CopyArray { /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { c ...
 // 将1、2、3、4、5、6、7、8、9 这九个数字分成三个百位数,每个数字用且只用一次, // 并且第三个数字是第一个的3倍,第二个数字是第一个的2倍。求三个数。 // [说明,结果可能多于一组,例如327 654 981] public class GetNumbers { /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { System.out.println(getN ...
 // 有600个苹果10个盒子,要求把600个苹果分装到10个盒子里。如果有人来买 // 苹果随便说出一个数,直接拿这些盒子组装一下就可以给他不用拆分盒子。 // 请问这10个盒子应该分别装多少苹果? // 扩展到n,得出方式,只是需要多少盒子,怎么分配。 public class SplitNumber { /** * @param args */ public static void main(String[] args) { split(600); } /** * Split. * * @param n * ...
使用java数组来实现杨辉三角,要求内存空间开辟越小越好 /** * The Class YangHuiTriangle. */ public class YangHuiTriangle { /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { new YangHuiTriangle().printYanghuiTriangle(10); } /** ...
问题: 表内容如下 ----------------------------- ID            LogTime 1            2008/10/10 10:00:00 1            2008/10/10 10:03:00 1            2008/10/10 10:09:00 2       2008/10/10 10:10:00 2       2008/10/10 10:11:00 ...... ----------------------------- 如何
问题:     现有表bill和表payment结构如下,两表通
问题:     取得表中除去id外重复的数据 建表:     DROP TABLE IF EXISTS `samedata`; CREATE TABLE `samedata` ( `Id` int(11) NOT NULL auto_increment, `name` varchar(12) default NULL, `object` varchar(12) default NULL, `info` int(11) default NULL, PRIMARY KEY
问题: 一个表有三列,A,B,C 请用SQL语句实现如下功能:
问题: 报表查询横向输出 1  gly 2  ptgly
问题: 表如下: 销售表:    NO ,  NO2,  数量   日期
表如下: a b c 三个字段有可能重复 数据如下: a b c d e ------- ---------- ---------- ----------- ----------- a a a 1 2 a a a 1 2 a a a 1 2 a a a 1 2 a a a 1 2 b b b 3 3 b b b 3 3 b b b 3 3 b b b 3 3
Global site tag (gtag.js) - Google Analytics