1 package cn.it; 2 3 import java.util.Arrays; 4 // 利用分治思想 实现 归并排序 5 public class Fz { 6 public static void main(String[] args) { 7 int ...
分类:
编程语言 时间:
2015-05-06 09:10:07
阅读次数:
140
对于字符串的替换:package six;import java.util.Arrays;public class Sixoneseven { public static void main(String[] args){ String arr[]=new String[]{"1...
分类:
编程语言 时间:
2015-05-05 12:07:54
阅读次数:
122
题目:编写java程序,创建数组arr1和arr2,将数组arr1中索引位置是0-3中的元素复制到数组arr2中,最后将数组arr1和arr2中的元素输出。package six;import java.util.Arrays;public class Sixonefive { pub...
分类:
编程语言 时间:
2015-05-05 10:18:12
阅读次数:
151
设计一个宠物商店的宠物管理 1、创建一个宠物类(昵称,价格,种类)并派生各种宠物,每种宠物都有各自吃食的方法 2、创建一个商店类,可以根据种类显示该种类所有的宠物信息import java.util.Arrays;public class HomeWork1 { publ...
分类:
其他好文 时间:
2015-05-04 19:50:43
阅读次数:
117
There are two sorted arrays nums1 and nums2 of
size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
这是一道非常经典的题。这题更通用的形式是,给定...
分类:
其他好文 时间:
2015-05-04 12:00:57
阅读次数:
100
1 public static void main(String args[]) { 2 List ints = Arrays.asList(new Integer[]{new Integer(1), new Integer(3)}); 3 int s =0; 4 ...
分类:
其他好文 时间:
2015-05-02 13:44:56
阅读次数:
92
首先推荐一下Google的代码风格:https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.4.3-switch-defaultenum售卖机1.定义售卖机接受的输入命令:package com.enumTest.enumStateMac;import java.util.Arrays;
import java.u...
分类:
编程语言 时间:
2015-05-02 09:38:04
阅读次数:
145
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:
其他好文 时间:
2015-05-01 17:19:25
阅读次数:
151
题目:there are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays.The overall run time complexity s...
分类:
其他好文 时间:
2015-04-30 23:08:07
阅读次数:
128
程序源代码(简单Java版):package arrays.myArray;import java.util.Scanner;public class SortObject { private static int intercePosition = 0; // 记录单个运算数据的长度 privat...
分类:
其他好文 时间:
2015-04-30 19:58:41
阅读次数:
201