Time of Update: 2015-06-19
標籤:leetcodeGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.題意:求字元串中最長的迴文感覺這題不難,可以這樣想,設定兩個指標,分別對應0,len-1。
Time of Update: 2015-06-20
標籤:網路編程 互連網 java internet ------<a href="http://www.itheima.com" target="blank">Java培訓、Android培訓、iOS培訓、.Net培訓</a>、期待與您交流!
Time of Update: 2015-06-19
標籤:一、琅序 java中的properties檔案是一種設定檔,主要用於表達配置資訊,檔案類型為*.properties,格式為文字檔,檔案的內容是格式是"鍵=值"的格式,在properties檔案中,可以用"#"來作注釋,properties檔案在Java編程中用到的地方很多,操作很方便。------------------------------------------------------ Java.util 中,Properties類繼承自 Hashtable1.
Time of Update: 2015-06-19
標籤:hashcode java map hashmap Map集合的子類HashMap的簡單操作方法import java.util.HashMap;import java.util.Iterator;public class HashMapDemos {public static void%r0main(String[] args) {// HashMap&
Time of Update: 2015-06-19
標籤:網路編程 網路通訊協定 java 用戶端 伺服器 網路編程現在是非常普遍的編程技術了,網路編程無非就是兩台或者多台裝置(通常是電腦)之間的相互連信,相互之間的資料轉送。網路編程的實質其實就是程式和程式之間的相互連信,相互傳遞資料。在網路通訊中,第一次主動發起通訊請求的成為用戶端(Client),第一次通訊中等待串連的稱為伺
Time of Update: 2015-06-20
標籤:
Time of Update: 2015-06-18
標籤:2.Student.java import java.util.Date; public class Student { private int id; private String name; private int age; private Date
Time of Update: 2015-06-19
標籤:Java語言畫圖package cn.witksy.dev;import javax.imageio.ImageIO;import java.awt.*;import java.awt.image.BufferedImage;import java.io.File;import java.io.IOException;/** * Author: Alfred * Created: 2015/5/7 */public class Main { public void run() {
Time of Update: 2015-06-19
標籤:javaimport java.io.IOException;import java.text.DateFormat;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.ArrayList;import java.util.Calendar;import java.util.Date;import java.util.List;import
Time of Update: 2015-06-19
標籤:以下是在64位win8系統上進行:1、代碼編譯串口通訊需要下載兩個串連庫檔案,rxtxSerial.dll,rxtxParallel.dll。網上說把這兩個檔案放到<JAVA_HOME>\jre\bin,但編譯出錯,後來我將他們放到<JAR_HOME>\bin編譯就通過了,我的目錄是:“C:\Program
Time of Update: 2015-06-19
標籤:因工作的關係,Eclipse開發的Java項目拷來拷去,有時候會報一個很奇怪的錯誤。明明源碼一模一樣,為什麼項目複製到另一台機器上,就會報“java compiler level does not match the version of the installed java project
Time of Update: 2015-06-19
標籤:主要知識點1. 建立多個對象 Dog d1 = new Dog(); Dog d2 = new Dog(); 對象名變數名(d1 ,d2)放在 棧記憶體 中 對象的實體放在堆記憶體中 2. 對象與對象之間的區別 Dog d1 = new Dog(); Dog d2 = new
Time of Update: 2015-06-19
標籤:把小孩醒來時的具體情況封裝成事件類別Test.java class WakenUpEvent{private long time;private String location;private Child source;public WakenUpEvent(long time, String location, Child source) {super();this.time = time;this.location = location;this.source =
Time of Update: 2015-06-19
標籤:視窗是GUI編程的基礎,小應用程式或圖形介面的應用程式的可視組件都放在視窗中,在GUI中,視窗是使用者螢幕的一部分,起著在螢幕中一個小螢幕的作用。有以下三種視窗:Applet視窗:Applet類管理這個視窗,當應用程式程式啟動時,由系統建立和處理;架構視窗(JFrame):這是通常意義上的視窗,它支援視窗周邊的架構、標題列,以及最小化、最大化和關閉按鈕;一種無邊框視窗(JWindow):沒有標題列,沒有架構,只是一個空的矩形。用Swing中的JFrame類或它的子類建立的對象就是JFram
Time of Update: 2015-06-19
標籤:package test;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.FileReader;import java.io.FileWriter;import java.io.IOException;import java.io.RandomAccessFile;public class file&
Time of Update: 2015-06-19
標籤:bout Sotirios-Efstathios ManeasSotirios-Efstathios (Stathis) Maneas is a postgraduate student at the Department of Informatics and Telecommunications of The National and Kapodistrian University of Athens. His main interests include distributed
Time of Update: 2015-06-19
標籤:迭代器 iterator java 對象 今天說說集合的iterator迭代器與集合下標的使用先上代碼import java.util.ArrayList;import java.util.Iterator;public class Test {public Test() {// 初始化ListaddItemToList();}private
Time of Update: 2015-06-19
標籤: import java.awt.*; // 可以改成 import javax.swing.*; public class FirstFrame { public static void main( String[] args ) { Frame f = new Frame(); //可以改成
Time of Update: 2015-06-19
標籤:java的webservice實現有多種方式,可用的工具也有一些。之前對這塊的只是比較缺乏,以至於一上來就一直看spring webservice.花費了幾天后發現和要用的功能不符,就···當前學習的需求是webservice client。因此整篇文章用來說明java webserviceclient的建立過程。首先使用java內建的soapconnection實現。那首先具體的client訪問流程為SOAPConnection
Time of Update: 2015-06-19
標籤:黑馬程式員 java基礎 treeset 自訂一個比較子,按照字串的長度升序的方法來比較字串進行儲存import java.util.Comparator;import java.util.Iterator;import java.util.TreeSet;class Mycompara implements Comparator{