![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
立勇同學
希望和牛人一起进步,做一些改变世界的事。
展开
-
Java核心类库——IO原理和用法
Java IO流(InputStream/OutputSteam)什么是IO流? byte序列的读写,Java中的IO流是实现输入/输出的基础.1)InputStream : 抽象类读取数据的过程 包含读取方法read(); in 模仿了读取小说的过程 简单说 : in是读取文件的OutputStream:抽象了写出数据的过程 包含写出方法writ转载 2014-11-09 11:12:34 · 526 阅读 · 0 评论 -
Class.forName的作用以及为什么要用它【转】
Posted on 2010-03-03 10:24 火之光 阅读(12075) 评论(1) 编辑 收藏Class.forName(xxx.xx.xx) 返回的是一个类首先你要明白在java里面任何class都要装载在虚拟机上才能运行。这句话就是装载类用的(和new 不一样,要分清楚)。至于什么时候用,你可以考虑一下这个问题,给你一个字符串变量,它代表一个类的包名和类名,你怎么转载 2014-11-06 11:18:34 · 456 阅读 · 0 评论 -
LeetCode Longest Palindromic Substring 最长回文子串
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exists one unique longest palindromic substring.(最长回文子串)中心扩展法:pub原创 2015-01-27 16:45:56 · 502 阅读 · 0 评论 -
Factorial Trailing Zeroes (java)
题目:Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.java代码实现:class Solution { public int trailingZeroes(int原创 2015-01-03 10:01:17 · 463 阅读 · 0 评论 -
Binary Search Tree Iterator 二叉搜索树的迭代器
题目:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: nex原创 2015-01-03 08:57:18 · 609 阅读 · 0 评论 -
Excel Sheet Column Number(java)
Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 public c原创 2015-01-04 00:29:57 · 484 阅读 · 0 评论 -
[LeetCode] Median of Two Sorted Arrays
There are two sorted arrays A and B 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)).public class Solution { pu原创 2015-01-04 20:29:59 · 654 阅读 · 0 评论 -
eclipse远程连接hbase遇到的问题
eclipse连接本地的hbase可以正常读写,但远程访问时可以连上却不能读写,这个问题可能是安装hbase时没配置好,hbase-site.xml里的hbase.zookeeper.quorum属性应该是主机名(可在命令行下通过hostname查看),然后在hosts中添加 xxx.xxx.xxx.xxx hostname 这样的ip映射.原创 2015-05-06 00:48:23 · 918 阅读 · 0 评论