赞
踩
基础操作符 比如说+ == !=之类的 只能用于基础数据 类型和字符串能用。
而且尤其注意相比较两个对象的值只能用equals()
字符串的相关方法:
Array只是能通过索引访问其中的元素 不能做任何排序之类的操作 但是Arrays类提供了以下方法
注意 这种包装类的方法调用时ClassName.method()
string的包装类
String.valueOf(Object obj): covert any obj to String
int的包装类
其传入的参数应该是Character,但是可以将char类型自动转化为Character类型的
this class is used for mathmatical operation which involoves very big integer calculations
it has many calculation method.
List var = new ArrayList();有以下方法
for(Map.Entry<Integer, Integer> entry: indegree.entrySet()) { if(entry.getValue() == 0) queue.offer(entry.getKey()); }
Iterator<String> itr = setOfStocks.iterator();
while(itr.hasNext()){ System.out.println(itr.next()); }
Read more: https://javarevisited.blogspot.com/2016/01/3-ways-to-loop-over-set-or-hashset-in-java.html#ixzz6Kix4OLLqthis data structure can do anything using given method, and you can poll from back or head.
接口相关的方法:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。