码迷,mamicode.com
首页 >  
搜索关键字:class    ( 183544个结果
[215]Kth Largest Element in an Array
public class Solution { public int findKthLargest(int[] nums, int k) { return find(nums,nums.length-k,0,nums.length-1); } public int f...
分类:其他好文   时间:2015-05-31 18:09:20    阅读次数:110
STL之map(待修改)
修改:less对象、排序sort 参见http://www.cplusplus.com/reference/map/map/ /* template , // map::key_compare class Alloc = allocator > // map::allocator_type > .....
分类:其他好文   时间:2015-05-31 16:47:46    阅读次数:189
java final域
1 public final class ThreeStooges { 2 3 4 /* 5 * stooges是Set类型的引用,final限定该引用成员属性stooges被赋初值后,就不能再改变去引用其他的同类对象 6 * final只是限定了声...
分类:编程语言   时间:2015-05-31 16:40:27    阅读次数:111
第2章商场促销(1)——工厂模式
/*shop.h文件*/#ifndef _SHOP_#define _SHOP_#include#include//现金收费抽象类class Cashsuper{public: virtual double acceptcash(double money);};//正常收费子类class cashn...
分类:其他好文   时间:2015-05-31 16:39:06    阅读次数:101
Spring2.5学习2.3_如何注入基本类型
前面学习了如何注入依赖对象,现在学习一下如何注入基本类型。 PersonServiceBean.java package xjj.service.impl; import xjj.dao.PersonDao; import xjj.service.PersonService; public class PersonServiceBean implements PersonSer...
分类:编程语言   时间:2015-05-31 15:24:58    阅读次数:95
Java反射基础(二)— Class类
上一篇博客中我们提到了ClassLoader,知道ClassLoader是用来动态加载某个Class文件到内存当中,但是这个Class文件是怎么生成的呢?从何而来?这又涉及到另一个概念—java.lang.Class。 Class 是java的一个特殊类,对于我们定义的类、接口,它更算是一个抽象类。Class类用于封装被装入到JVM中的类(包括类和接口)的信息。 当一个类和接口被装入JV...
分类:编程语言   时间:2015-05-31 15:23:16    阅读次数:113
JAVA 文档注释,类的说明,HTML说明文档的生成
有的时候,我们会写一些类,编译成.class文件,给别人使用,那么,别人不知道这个类有哪些方法,如何调用。所以我们需要做一个类的说明文档。可以采用在.java类里面进行注释,通过注释来生成类的说明文档的方法。一、.java中注释的写法:Test1.java/*文档注释*//**此类是对数组进行取最值...
分类:编程语言   时间:2015-05-31 15:18:46    阅读次数:183
Hadoop之——MapReduce实现从海量数字信息中获取最大值
通过Hadoop的自定义排序算法可实现从海量数字中获取最大值,不多说,直接上代码 1、Mapper类的实现 static class MyMapper extends Mapper{ long max = Long.MIN_VALUE; protected void map(LongWritable k1, Text v1, Context context) throws ja...
分类:其他好文   时间:2015-05-31 14:07:01    阅读次数:212
Who's in the Middle
import java.util.Scanner; public class p1157 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int n = sc.nextInt(); if(n==0){ retu...
分类:其他好文   时间:2015-05-31 14:05:56    阅读次数:150
URAL1091---Tmutarakan Exams(dp)
University of New Tmutarakan trains the first-class specialists in mental arithmetic. To enter the University you should master arithmetic perfectly. One of the entrance exams at the Divisibility Depar...
分类:其他好文   时间:2015-05-31 14:05:25    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!