码迷,mamicode.com
首页 >  
搜索关键字:Arrays    ( 3585个结果
分治思想--小测试(归并排序后续)
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
第6章 数组 替换数组
对于字符串的替换: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
第6章 数组 复制数组
题目:编写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
Median of Two Sorted Arrays
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
Generics and Collection (1)
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
enum 实现售卖机
首先推荐一下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
LeetCode 4 -- Median of Two Sorted Arrays
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
Leetcode 解题 Median of Two sorted arrays
题目: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
5.1(封装,测试)
程序源代码(简单Java版):package arrays.myArray;import java.util.Scanner;public class SortObject { private static int intercePosition = 0; // 记录单个运算数据的长度 privat...
分类:其他好文   时间:2015-04-30 19:58:41    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!