- 博客(11)
- 资源 (3)
- 收藏
- 关注
原创 Java--文件遍历并按层级输出
package com.file;import java.io.File;public class FileScanner {public static void main(String[] args) {// TODO Auto-generated method stublistFile(new File("../javabasic"), 1);}public static void listF
2015-04-27 00:51:08 1042
原创 Java--获取指定格式的文件并批量修改文件
1. 获取指定目录下的所有指定格式的文件2. 修改该格式下指定的字符串3. Invoke getFileWithSuffix(filePath, fileSuffix, srcStr, desStr), 传入的参数包括文件目录, 文件格式, 要替换的字符串, 替换成的字符串**GetFileFromTargetPath class which used to search al
2015-04-20 22:39:15 399
原创 Java--获取指定目录下指定suffix的文件
1. 获取指定目录下的文件2. 获取该目录下与所给suffix相符的文件package com.basic.io;import java.io.File;import java.util.Scanner;public class GetFileFromTargetPath { private static Scanner scanner; private static i
2015-04-20 00:56:35 1803
原创 Java--获取指定目录下的所有文件
Java -- 获取指定目录下的所有文件1. 通过console 输入要搜索文件的目录2. Invoke getFileName 方法获取该目录下的所有文件package com.basic.io;import java.io.File;import java.util.Scanner;public class GetFileFromTargetPath { p
2015-04-20 00:24:31 537
原创 Java 单文本替换并计算替换的个数
1. 对单一文本的字符串进行替换, 从console 输入需要替换的字符串和target字符串, 同时文件也可以自己指定。2. 输出替换的字符串的个数package com.basic.io;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;impo
2015-04-16 13:31:18 706
原创 Collections -- ArrayList vs LinkedList
CollectionThe collection interface provides the basic operations for adding and removing elements in a collection. The add method adds an element to the collection. The addAll method adds all the
2015-04-09 13:07:48 331
原创 Maps--HashMap, LinkedHashMap, TreeMap
A map is a container object that stores a collection of key/value pairs. It enables fast retrieval, deletion, and updating of the pair through the key. A map stores the values along with the keys. The
2015-04-07 00:13:42 418
原创 Performance between Sets and List
The sets and list are offen used to store the processing data, but which one is more efficient and performance better, here below is the example for testing which one is better.Example:pac
2015-04-06 01:43:11 443
原创 Set--HashSet, LinkedHashSet, TreeSet
A set is an efficient data structure for storing and processing non-duplicate elements. A map is like a dictionary that provides a quick lookup to retrieve a value using a key.
2015-04-02 22:28:30 400
原创 Overriding && Overloading
OverridingTo override a method, the method must be defined in the subclass using the same signature and the same return type as in its superclass.It is the method that used between superclass and
2015-04-01 13:22:09 426
原创 Map 根据value 获取key
package com.basic.object;import java.util.ArrayList;import java.util.HashMap;import java.util.Map;public class GetKeyByValue {public static ArrayList getAllKey(Map sourceMap, Map t
2015-04-01 01:06:47 852
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人