
Java
Passion is Energy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Generic classes and methods
Generic classes(1)Generic methods(2)(3)The tricky code is <T extends Comparable>. Initially, I thought once we extends the Comparable interface, we have to @override compareTo() method. Af...原创 2019-08-19 08:10:37 · 125 阅读 · 0 评论 -
ASCII Code
public static void main(String[] args) { Queue<String> queue = new LinkedList<>(); queue.add("a"); queue.add("1"); sortQueue(queue); char character ...原创 2019-08-19 08:24:00 · 138 阅读 · 0 评论 -
float Vs int
float => intclass GFG{ public static void main(String[] args) { int[] arr = {1,2,3}; int a = test(0,3); System.out.println(arr[a]); } public static int t...原创 2019-08-20 09:12:40 · 145 阅读 · 0 评论 -
得到absolute path 和 当前file的当前文件夹位置
import java.io.File;import java.net.URL; public static void test(){ /* * 得到目前文件的absolute path */ URL url = Main.class.getResource("happiness.txt"); ...原创 2019-09-08 14:32:25 · 569 阅读 · 0 评论 -
arrayList or array in java
Arraylist is a variable length Collection class while array has a fixed length.Arraylist only can store Objects while array can store both objects and primitives.原创 2019-09-22 20:40:33 · 151 阅读 · 0 评论