Time of Update: 2015-05-31
標籤:1、Java集合類可以用於儲存數量不等的多個對象,還可以用於儲存具有映射關係的關聯陣列。2、Java集合可分為Collection和Map兩種體系:--Collection:1)Set:元素無序、不可重複的集合;2)List:元素有序,可重複的集合--Map:具有映射關係"key/value對"的集合。3、Collection介面: |----List介面: |----ArrayList、LinkedList、Vector |----Set介面: |----HashSet、
Time of Update: 2015-05-31
標籤:數位簽章 訊息摘要 安全 dsa rsa 數位簽章能夠驗證資料完整性、認證資料來源,並起到抗否認的作用,這3點與OSI參考模型中的資料完整性服務、認證(鑒別)服務和抗否認性服務相對應。訊息摘要演算法是驗證資料完整性的最佳演算法,因此,該演算法成為數位簽章中的必要組成部分。
Time of Update: 2015-05-31
標籤:1.java變數 程式中最基本的儲存單元,包括變數名、變數類型、範圍。 java中的每一個變數,都屬於特定的資料類型,必須先進行聲明,然後賦值,才能使用。
Time of Update: 2015-06-01
標籤:題目:Given a 2d grid map of ‘1‘s (land) and ‘0‘s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are
Time of Update: 2015-06-01
標籤:一:查看類型windows:set java_home:查看JDK安裝路徑java -version:查看JDK版本linux:whereis javawhich java (java執行路徑)echo $JAVA_HOMEecho $PATH二:下面是配置linux的環境變數:(記得source .bash_profile)1. 修改/etc/profile檔案 (全域所有使用者)vi 此檔案/etc/profile在profile檔案末尾加入:export
Time of Update: 2015-05-31
標籤:JSP表單裡面的表單輸入<input type= "text" name="user">這裡面的每一個輸入都是一個Attribute,相當於setAttribute("name",user);如果是提交到Action裡面,則需要相應的Action有對應的同名變數定義和setter/getter方法,即使你沒有用它做任何操作。Action裡面的提供Setter/Getter的方法會將其取出來交給execute方法。如:type varname;public String
Time of Update: 2015-05-31
標籤:由於對float或double 的使用不當,可能會出現精度丟失的問題。問題大概情況可以通過如下代碼理解: [java] view plaincopyprint?public class FloatDoubleTest { public static void main(String[] args) { float f = 20014999
Time of Update: 2015-05-31
標籤:java 組播 多播 multicastsocket 在單播模式中有伺服器端和用戶端之分,而組播模式與單播模式不同,每個端都是以路由器或交換器做為中轉廣播站,任意一端向路由器或交換器發送訊息,路由或交換器負責發送其他節點,每個節點都是同等的。所以在編程模式上用同一個類表示即可——MulticastSocket。  
Time of Update: 2015-05-31
標籤:swing jtree 樹狀組件 一 簡單樣式TreeNodeDemo.javapackage com.sjf;import javax.swing.JFrame;import javax.swing.JTree;import javax.swing.event.TreeSelectionEvent;import
Time of Update: 2015-05-31
標籤: /*設計模式:針對此類問題最有效解決方案JAVA
Time of Update: 2015-05-30
標籤:java acm 問題:開始用的long,裝不下,就立馬想用大數來做。在long裝不下時不要立馬就用大數,可以試試用double,double可以滿足大多數要求不容易系列之(3)—— LELE的RPG難題Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total
Time of Update: 2015-05-29
標籤:java acm 遞推 問題:遞推。不容易系列之二Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19451 Accepted
Time of Update: 2015-05-29
標籤:If you override a method from your superclass (or your superclass‘s superclass etc.), super.theMethod() will invoke the original method instead of the one you overrode it with. If you did not actual override theMethod, super.theMethod() will act
Time of Update: 2015-05-29
標籤:Java的cmd配置(也即Java的JDK配置及相關常用命令)
Time of Update: 2015-05-29
標籤:Java中volatile修飾符是一種用來保證不同線程之間互動的特殊機制。當一個線程修改volatile變數,另一個線程能夠看到這個修改。第一個線程通知第二個線程變數已經被修改。下面用圖來解釋:ready是一個volatile boolean變數, 初值設為false. answer是一個非volatile
Time of Update: 2015-05-29
標籤:java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. ...
Time of Update: 2015-05-28
標籤:一、 處理任務時,應該將代碼分成不同的部分,每一部分由一個線程進行,但是會因為任務負載不平衡導致有閑有忙。最好是應分成不同的部分,分配不同的線程,盡量讓處理器不停的處理,不要閑下來。如何分配線程數,有一個公式: 線程數 =
Time of Update: 2015-05-28
標籤:共用變數 可見度 synchronized java多線程 volatile 一、JAVA記憶體模型簡介JAVA Merory
Time of Update: 2015-05-29
標籤:file javaio IO中主要的類和介面File、InputStream、OutputStream、Reader、Writer、Serialzable介面File類File類應用的小例子import java.io.File;import java.io.IOException;public class FileDemo { public static void main(String[] args) {
Time of Update: 2015-05-28
標籤:1.只輸入一組資料: Scanner s=new Scanner(System.in);int a=s.nextInt();int b=s.nextInt();2.輸入有多組資料,沒有說明輸入幾組資料,每組資料佔一行:Scanner s=new Scanner(System.in);while(s.hasnext()){//判斷是否資料結束int a=s.nextInt();int