原创 mybatis基礎知識 回顧

用mybatis解決的問題: 1.用數據庫連接池,代替頻繁連接關閉數據庫,浪費數據庫資源;2.用xml存放sql語句,更好的維護和開發;3.關係映射模型將數據庫的數據封裝成javabean,減少了硬編碼。 創建maven工程

原创 idea+Maven配置學習spring的環境——驗證IOC

idea配置maven 百度很多。 idea創建項目 添加主要的依賴 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/

原创 Java基礎知識——反射

通配符 public class Test5 { public static void main(String[] args) { Dd dd = new Dd(); Lis

原创 Java動態代理(1)

實現: 新建ITestDemo接口 package com.study.javastu3; public interface ITestDemo { public void test(); public voi

原创 Java基礎知識-線程

三種創建方式; 1,繼承Thread類 package com.study.javastu3; import java.util.concurrent.Callable; import java.util.concurrent.

原创 Java基礎知識學習

1.Java特性 C缺少垃圾回收機制、可移植性的安全性、分佈程序設計、多線程功能,爲了實現可以輕鬆移植到各種設備上,導致了Java的誕生。Java雖然繼承了C、C++,但Java是完全的面嚮對象語言。 Java主要特性如下: 強

原创 Java 集合類型排序

自定義對象的集合排序 public class Person { Integer age; String name; public Person(Integer age, String name) {

原创 刪除集合中一個指定的元素& remove元素失敗

Java基礎——刪除集合中一個指定的元素 List<String> lst =new ArrayList<String>(); lst.add("b"); lst.add("b");

原创 最長不下降子序列

最長不下降子序列解法 第一種就是普通的dp方法 for(int i=1;i<=n;i++){ cin>>a[i]; // dp[i]=1; } // dp[0]=-1; for(int

原创 1067 Sort with Swap(0, i) (25分)

1067 Sort with Swap(0, i) (25分) Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in inc

原创 1033 To Fill or Not to Fill (25分)

1033 To Fill or Not to Fill (25分) With highways available, driving a car from Hangzhou to any other city is easy. But s

原创 1028 List Sorting (25分)

Excel can sort records according to any column. Now you are supposed to imitate this function. Input Specification: Eac

原创 1065 A+B and C (64bit) (20分)

Given three integers A, B and C in [−2​63​​,2​63​​], you are supposed to tell whether A+B>C. Input Specification: The f

原创 1032 Sharing (25分)

To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may

原创 1076 Forwards on Weibo (30分)

1076 Forwards on Weibo (30分) Weibo is known as the Chinese version of Twitter. One user on Weibo may have many follower